Skip to content

Commit a569355

Browse files
committed
Stop the runtime instead of the interpreter.
1 parent 91d94d9 commit a569355

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Python/pylifecycle.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2449,7 +2449,8 @@ Py_EndInterpreter(PyThreadState *tstate)
24492449
_Py_FinishPendingCalls(tstate);
24502450

24512451
_PyAtExit_Call(tstate->interp);
2452-
_PyEval_StopTheWorld(interp);
2452+
_PyRuntimeState *runtime = interp->runtime;
2453+
_PyEval_StopTheWorldAll(runtime);
24532454
/* Remaining daemon threads will automatically exit
24542455
when they attempt to take the GIL (ex: PyEval_RestoreThread()). */
24552456
_PyInterpreterState_SetFinalizing(interp, tstate);
@@ -2459,7 +2460,7 @@ Py_EndInterpreter(PyThreadState *tstate)
24592460
_PyThreadState_SetShuttingDown(p);
24602461
}
24612462

2462-
_PyEval_StartTheWorld(interp);
2463+
_PyEval_StartTheWorldAll(runtime);
24632464
_PyThreadState_DeleteList(list, /*is_after_fork=*/0);
24642465

24652466
// XXX Call something like _PyImport_Disable() here?

0 commit comments

Comments
 (0)