mirror of
https://github.com/python/cpython.git
synced 2025-08-24 10:45:53 +00:00
bpo-43879: Add native_thread_id field to PyThreadState (GH-25458)
This commit is contained in:
parent
4f725261c6
commit
90a6c07cb2
4 changed files with 17 additions and 0 deletions
|
@ -645,6 +645,11 @@ new_threadstate(PyInterpreterState *interp, int init)
|
|||
tstate->gilstate_counter = 0;
|
||||
tstate->async_exc = NULL;
|
||||
tstate->thread_id = PyThread_get_thread_ident();
|
||||
#ifdef PY_HAVE_THREAD_NATIVE_ID
|
||||
tstate->native_thread_id = PyThread_get_thread_native_id();
|
||||
#else
|
||||
tstate->native_thread_id = 0;
|
||||
#endif
|
||||
|
||||
tstate->dict = NULL;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue