Issue #18418: After fork(), reinit all threads states, not only active ones.

Patch by A. Jesse Jiryu Davis.
This commit is contained in:
Charles-François Natali 2013-08-30 23:34:26 +02:00
commit 79a53ea7d7
4 changed files with 26 additions and 1 deletions

View file

@ -940,7 +940,7 @@ def _after_fork():
new_active = {}
current = current_thread()
with _active_limbo_lock:
for thread in _active.values():
for thread in _enumerate():
# Any lock/condition variable may be currently locked or in an
# invalid state, so we reinitialize them.
thread._reset_internal_locks()