gh-144706: Warn against using synchronization primitives within signal handlers (GH-144736)
(cherry picked from commit
945bf8ce1bf7ee3881752c2ecc129e35ab818477)
Co-authored-by: Robsdedude <dev@rouvenbauer.de>
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
---------------