Thanks to visit codestin.com Credit goes to github.com
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 95d7519 commit 59830b6Copy full SHA for 59830b6
1 file changed
Python/pystate.c
@@ -425,14 +425,7 @@ PyThreadState_DeleteCurrent()
425
_Py_atomic_store_relaxed(&_PyThreadState_Current, NULL);
426
if (autoInterpreterState && PyThread_get_key_value(autoTLSkey) == tstate)
427
PyThread_delete_key_value(autoTLSkey);
428
- /*
429
- Only call tstate_delete_common to have the tstate if we're not finalizing
430
- or we're the main thread. The main thread will do this for us. Not calling
431
- tstate_delete_common means we won't lock the interpreter head lock,
432
- avoiding a possible deadlock with the GIL.
433
- */
434
- if (!_Py_Finalizing || _Py_Finalizing == tstate)
435
- tstate_delete_common(tstate);
+ tstate_delete_common(tstate);
436
PyEval_ReleaseLock();
437
}
438
#endif /* WITH_THREAD */
0 commit comments