| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
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 doesn't call PyThread_update_thread_after_fork(). As far as I can tell, that call did not have any effect: we determine the current thread using PyThread_get_thread_ident_ex() (via get_ident) 1 so there's no way we could have a thread with a stale identifier. And if we don't find a matching thread, we create a new _MainThread() with the correct current identifier (and no handle). Footnotes |
Sorry, something went wrong.
That's a good point, but then we can probably remove the PyThread_update_thread_after_fork function? |
Sorry, something went wrong.
There was a problem hiding this comment.
Neat, thank you @colesbury !
Sorry, something went wrong.
|
Note: you're a core developer now ;-) |
Sorry, something went wrong.
|
nice refactoring, thanks! happy first-ish merge! |
Sorry, something went wrong.
…king (python#115042) 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.
| Back | FazBrowse Home | New Git URL |
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.