Skip to content

Commit 57ce53f

Browse files
committed
Review feedback
1 parent fe1db59 commit 57ce53f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Doc/library/threading.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ level :mod:`_thread` module.
1313

1414
.. include:: ../includes/wasm-notavail.rst
1515

16+
.. warning::
17+
18+
Syncrhonization primitives must not be shared between between :mod:`signal`
19+
handlers and the main thread.
20+
Because blocking syncrhonizations calls can be interrupted by signals,
21+
such sharing can lead to surprising dead locks.
22+
23+
1624
Introduction
1725
------------
1826

@@ -840,12 +848,6 @@ the lock to an unlocked state and allows another thread blocked in
840848
must have a release in the thread that has acquired the lock. Failing to
841849
call release as many times the lock has been acquired can lead to deadlock.
842850

843-
.. tip::
844-
845-
Because lock acquisition can be interrupted by signals, sharing reentrant
846-
locks between :mod:`signal` handlers and the main thread can lead to
847-
surprising behavior. Therefore, this is generally not recommended.
848-
849851

850852
.. class:: RLock()
851853

0 commit comments

Comments
 (0)