diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-06-12 23:30:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-12 23:30:17 (GMT) |
commit | 468e5fec8a2f534f1685d59da3ca4fad425c38dd (patch) | |
tree | ab031e145d86984c0a6236053e8768207e3b2fb2 /Doc/c-api/veryhigh.rst | |
parent | b4c7defe58695a6670a8fdeaef67a638bbb47e42 (diff) | |
download | cpython-468e5fec8a2f534f1685d59da3ca4fad425c38dd.zip cpython-468e5fec8a2f534f1685d59da3ca4fad425c38dd.tar.gz cpython-468e5fec8a2f534f1685d59da3ca4fad425c38dd.tar.bz2 |
bpo-36402: Fix threading._shutdown() race condition (GH-13948)
Fix a race condition at Python shutdown when waiting for threads.
Wait until the Python thread state of all non-daemon threads get
deleted (join all non-daemon threads), rather than just wait until
Python threads complete.
* Add threading._shutdown_locks: set of Thread._tstate_lock locks
of non-daemon threads used by _shutdown() to wait until all Python
thread states get deleted. See Thread._set_tstate_lock().
* Add also threading._shutdown_locks_lock to protect access to
threading._shutdown_locks.
* Add test_finalization_shutdown() test.
Diffstat (limited to 'Doc/c-api/veryhigh.rst')
0 files changed, 0 insertions, 0 deletions