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:32:53 +02:00
parent dee0434e2f
commit 9939cc89a4
4 changed files with 26 additions and 1 deletions

View file

@ -935,7 +935,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()