summaryrefslogtreecommitdiffstats
path: root/Lib/threading.py
diff options
context:
space:
mode:
authorCharles-François Natali <cf.natali@gmail.com>2013-08-30 21:34:26 (GMT)
committerCharles-François Natali <cf.natali@gmail.com>2013-08-30 21:34:26 (GMT)
commit79a53ea7d7d66f515b6bd4a38b1adbe8961a69f2 (patch)
tree1fad390e1918b6039c2cf2490d853614b52827ce /Lib/threading.py
parentb586934f0eb69a3c04e1756abe9aa5a4ab307518 (diff)
parent9939cc89a4ee54ab50719a597a8b8a0795a691f6 (diff)
downloadcpython-79a53ea7d7d66f515b6bd4a38b1adbe8961a69f2.zip
cpython-79a53ea7d7d66f515b6bd4a38b1adbe8961a69f2.tar.gz
cpython-79a53ea7d7d66f515b6bd4a38b1adbe8961a69f2.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 c7f919c..21bc781 100644
--- a/Lib/threading.py
+++ b/Lib/threading.py
@@ -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()