forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (pythonG…
…H-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. (cherry picked from commit a22be49) Co-authored-by: Victor Stinner <vstinner@python.org>
- Loading branch information
1 parent
08e387a
commit 1ecb641
Showing
2 changed files
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Misc/NEWS.d/next/Library/2021-09-23-22-17-26.bpo-45274.gPpa4E.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Fix a race condition in the :meth:`Thread.join() <threading.Thread.join>` | ||
method of the :mod:`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. Patch by Victor | ||
Stinner. |