From 7eaf3f7080a0b0e1e551d2d9d2dcddd54d53af59 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sun, 25 Aug 2013 19:48:18 +0200 Subject: Issue #18808: Non-daemon threads are now automatically joined when a sub-interpreter is shutdown (it would previously dump a fatal error). --- Python/pythonrun.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Python/pythonrun.c') diff --git a/Python/pythonrun.c b/Python/pythonrun.c index b0bc549647..37dc3b8dc8 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -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"); -- cgit v1.2.1