mirror of
https://github.com/python/cpython.git
synced 2026-02-22 07:00:51 +00:00
gh-144706: Warn against using synchronization primitives within signal handlers (GH-144736)
This commit is contained in:
parent
66da7bf6fe
commit
945bf8ce1b
1 changed files with 5 additions and 0 deletions
|
|
@ -68,6 +68,11 @@ the synchronization primitives from the :mod:`threading` module instead.
|
|||
|
||||
Besides, only the main thread of the main interpreter is allowed to set a new signal handler.
|
||||
|
||||
.. warning::
|
||||
|
||||
Synchronization primitives such as :class:`threading.Lock` should not be used
|
||||
within signal handlers. Doing so can lead to unexpected deadlocks.
|
||||
|
||||
|
||||
Module contents
|
||||
---------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue