mirror of
https://github.com/python/cpython.git
synced 2025-10-30 21:21:22 +00:00
Initialize thread_id to 0 in unthreaded build. Fixes #770247.
This commit is contained in:
parent
61bfb736b4
commit
f9ce67d65f
1 changed files with 4 additions and 0 deletions
|
|
@ -144,7 +144,11 @@ PyThreadState_New(PyInterpreterState *interp)
|
||||||
tstate->tick_counter = 0;
|
tstate->tick_counter = 0;
|
||||||
tstate->gilstate_counter = 0;
|
tstate->gilstate_counter = 0;
|
||||||
tstate->async_exc = NULL;
|
tstate->async_exc = NULL;
|
||||||
|
#ifdef WITH_THREAD
|
||||||
tstate->thread_id = PyThread_get_thread_ident();
|
tstate->thread_id = PyThread_get_thread_ident();
|
||||||
|
#else
|
||||||
|
tstate->thread_id = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
tstate->dict = NULL;
|
tstate->dict = NULL;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue