summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2013-08-30 21:30:50 (GMT)
committerCharles-François Natali <cf.natali@gmail.com>2013-08-30 21:30:50 (GMT)
commit30a5445b30bb627a64b2d30788f6db58f6db3ae1 (patch)
treee2c1e80823eca78cc037775f2a7a4823797e9112 /Lib/threading.py
parentb2fa280e9e1da3724a81f47a4659cc3526d95a96 (diff)
downloadcpython-30a5445b30bb627a64b2d30788f6db58f6db3ae1.zip
cpython-30a5445b30bb627a64b2d30788f6db58f6db3ae1.tar.gz
cpython-30a5445b30bb627a64b2d30788f6db58f6db3ae1.tar.bz2
Issue #18418: After fork(), reinit all threads states, not only active ones.
Patch by A. Jesse Jiryu Davis.
Diffstat (limited to 'Lib/threading.py')
-rw-r--r--Lib/threading.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/threading.py b/Lib/threading.py
index 225448b..72c8319 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -1220,7 +1220,7 @@ def _after_fork():
new_active = {}
current = current_thread()
with _active_limbo_lock:
- for thread in _active.itervalues():
+ for thread in _enumerate():
# Any lock/condition variable may be currently locked or in an
# invalid state, so we reinitialize them.
if hasattr(thread, '_reset_internal_locks'):