Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a569355

Browse filesBrowse files
committed
Stop the runtime instead of the interpreter.
1 parent 91d94d9 commit a569355
Copy full SHA for a569355

File tree

1 file changed

+3
-2
lines changed
Filter options

1 file changed

+3
-2
lines changed

‎Python/pylifecycle.c

Copy file name to clipboardExpand all lines: Python/pylifecycle.c
+3-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.