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:
Antoine Pitrou 2013-08-25 19:48:18 +02:00
parent 0bb766b95c
commit 7eaf3f7080
3 changed files with 54 additions and 0 deletions

View file

@ -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");