Skip to content

gh-115035: Mark ThreadHandles as non-joinable earlier after forking#115042

Merged
colesbury merged 2 commits intopython:mainfrom
colesbury:gh-115035-thread-handle
Feb 6, 2024
Merged

gh-115035: Mark ThreadHandles as non-joinable earlier after forking#115042
colesbury merged 2 commits intopython:mainfrom
colesbury:gh-115035-thread-handle

Conversation

@colesbury
Copy link
Copy Markdown
Contributor

@colesbury colesbury commented Feb 5, 2024

This marks dead ThreadHandles as non-joinable earlier in PyOS_AfterFork_Child() before we execute any Python code. The handles are stored in a global linked list in _PyRuntimeState because fork() affects the entire process.

This marks dead ThreadHandles as non-joinable earlier in
`PyOS_AfterFork_Child()` before we execute any Python code. The handles
are stored in a global linked list in `_PyRuntimeState` because `fork()`
affects the entire process.
@colesbury colesbury changed the title gh-115035: Mark ThreadHandles as non-joinable earlier gh-115035: Mark ThreadHandles as non-joinable earlier after forking Feb 5, 2024
@colesbury
Copy link