mirror of
https://github.com/python/cpython.git
synced 2025-09-24 17:33:29 +00:00
[3.14] gh-132542: Set native thread ID after fork (GH-132701) (GH-134356)
(cherry picked from commit 6b73502313
)
Co-authored-by: Noam Cohen <noam@noam.me>
This commit is contained in:
parent
dc5866ab25
commit
8e8d5c91cd
3 changed files with 32 additions and 0 deletions
|
@ -951,6 +951,8 @@ class Thread:
|
|||
# This thread is alive.
|
||||
self._ident = new_ident
|
||||
assert self._os_thread_handle.ident == new_ident
|
||||
if _HAVE_THREAD_NATIVE_ID:
|
||||
self._set_native_id()
|
||||
else:
|
||||
# Otherwise, the thread is dead, Jim. _PyThread_AfterFork()
|
||||
# already marked our handle done.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue