mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00: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:
parent
0bb766b95c
commit
7eaf3f7080
3 changed files with 54 additions and 0 deletions
|
@ -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");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue