mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
Issue #18418: After fork(), reinit all threads states, not only active ones.
Patch by A. Jesse Jiryu Davis.
This commit is contained in:
parent
dee0434e2f
commit
9939cc89a4
4 changed files with 26 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue