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.
2 parents 61f1acc + 17548dd commit e6bfdb9Copy full SHA for e6bfdb9
1 file changed
Python/ceval.c
@@ -1267,6 +1267,13 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
1267
/* Other threads may run now */
1268
1269
take_gil(tstate);
1270
+
1271
+ /* Check if we should make a quick exit. */
1272
+ if (_Py_Finalizing && _Py_Finalizing != tstate) {
1273
+ drop_gil(tstate);
1274
+ PyThread_exit_thread();
1275
+ }
1276
1277
if (PyThreadState_Swap(tstate) != NULL)
1278
Py_FatalError("ceval: orphan tstate");
1279
}
0 commit comments