Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Account for handles being cleared after fork
  • Loading branch information
mpage committed Feb 10, 2024
commit 092c2ebd3f0fb03d408b81e47cc61ede8fc6322e
4 changes: 3 additions & 1 deletion Lib/threading.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,9 @@ def join(self, timeout=None):
self._join_os_thread()

def _join_os_thread(self):
self._handle.join()
# self._handle may be cleared post-fork
if self._handle is not None:
self._handle.join()

def _wait_for_tstate_lock(self, block=True, timeout=-1):
# Issue #18808: wait for the thread state to be gone.
Expand Down