diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-25 17:48:18 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2013-08-25 17:48:18 (GMT) |
commit | 7eaf3f7080a0b0e1e551d2d9d2dcddd54d53af59 (patch) | |
tree | a2f3078056ba9c1e132603385ea9bc4f379032cb /Python/pythonrun.c | |
parent | 0bb766b95cc672a82d29fbe339e515b921f1bfcc (diff) | |
download | cpython-7eaf3f7080a0b0e1e551d2d9d2dcddd54d53af59.zip cpython-7eaf3f7080a0b0e1e551d2d9d2dcddd54d53af59.tar.gz cpython-7eaf3f7080a0b0e1e551d2d9d2dcddd54d53af59.tar.bz2 |
Issue #18808: Non-daemon threads are now automatically joined when a sub-interpreter is shutdown (it would previously dump a fatal error).
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index b0bc549..37dc3b8 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"); |