Mercurial > cpython-lru_cache-weakref
diff Python/pythonrun.c @ 85398:becbb65074e1
Issue #18808: Non-daemon threads are now automatically joined when a sub-interpreter is shutdown (it would previously dump a fatal error).
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sun, 25 Aug 2013 19:48:18 +0200 |
| parents | dd0d751cc7f1 |
| children | df2fdd42b375 |
line wrap: on
line diff
--- a/Python/pythonrun.c Sun Aug 25 18:29:16 2013 +0200 +++ b/Python/pythonrun.c Sun Aug 25 19:48:18 2013 +0200 @@ -789,6 +789,9 @@ 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");
