We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 513c658 commit 15fd123Copy full SHA for 15fd123
Python/ceval.c
@@ -240,10 +240,11 @@ PyEval_ReInitThreads(void)
240
if (!gil_created())
241
return;
242
recreate_gil();
243
- _PyRuntime.main_thread = PyThread_get_thread_ident();
244
- // XXX Set for every interpreter.
245
- current_tstate->interp->ceval.pending.lock = PyThread_allocate_lock();
+ // This will be reset in make_pending_calls() below.
+ current_tstate->interp->ceval.pending.lock = NULL;
+
246
take_gil(current_tstate);
247
+ _PyRuntime.main_thread = PyThread_get_thread_ident();
248
249
/* Destroy all threads except the current one */
250
_PyThreadState_DeleteExcept(current_tstate);
0 commit comments