]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532)
authorVictor Stinner <vstinner@python.org>
Mon, 27 Sep 2021 12:20:31 +0000 (14:20 +0200)
committerGitHub <noreply@github.com>
Mon, 27 Sep 2021 12:20:31 +0000 (14:20 +0200)
commita22be4943c119fecf5433d999227ff78fc2e5741
tree061ad7b75596c8471cd94815db0240b4b17d1259
parent7b88f63e1dd4006b1a08b9c9f087dd13449ecc76
bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532)

Fix a race condition in the Thread.join() method of the threading
module. If the function is interrupted by a signal and the signal
handler raises an exception, make sure that the thread remains in a
consistent state to prevent a deadlock.
Lib/threading.py
Misc/NEWS.d/next/Library/2021-09-23-22-17-26.bpo-45274.gPpa4E.rst [new file with mode: 0644]