diff options
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index ebc17ea5a7..4001c63ff2 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -606,13 +606,12 @@ new_threadstate(PyInterpreterState *interp, int init) tstate->context = NULL; tstate->context_ver = 1; - tstate->id = ++interp->tstate_next_unique_id; - if (init) { _PyThreadState_Init(tstate); } HEAD_LOCK(runtime); + tstate->id = ++interp->tstate_next_unique_id; tstate->prev = NULL; tstate->next = interp->tstate_head; if (tstate->next) |