mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Issue #18808: Non-daemon threads are now automatically joined when a sub-interpreter is shutdown (it would previously dump a fatal error).
This commit is contained in:
@@ -789,6 +789,9 @@ Py_EndInterpreter(PyThreadState *tstate)
|
||||
Py_FatalError("Py_EndInterpreter: thread is not current");
|
||||
if (tstate->frame != NULL)
|
||||
Py_FatalError("Py_EndInterpreter: thread still has a frame");
|
||||
|
||||
wait_for_thread_shutdown();
|
||||
|
||||
if (tstate != interp->tstate_head || tstate->next != NULL)
|
||||
Py_FatalError("Py_EndInterpreter: not the last thread");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user