Mercurial > cpython-lru_cache-weakref
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 85396:2f688a51b37b | 85398:becbb65074e1 |
|---|---|
| 787 | 787 |
| 788 if (tstate != PyThreadState_GET()) | 788 if (tstate != PyThreadState_GET()) |
| 789 Py_FatalError("Py_EndInterpreter: thread is not current"); | 789 Py_FatalError("Py_EndInterpreter: thread is not current"); |
| 790 if (tstate->frame != NULL) | 790 if (tstate->frame != NULL) |
| 791 Py_FatalError("Py_EndInterpreter: thread still has a frame"); | 791 Py_FatalError("Py_EndInterpreter: thread still has a frame"); |
| 792 | |
| 793 wait_for_thread_shutdown(); | |
| 794 | |
| 792 if (tstate != interp->tstate_head || tstate->next != NULL) | 795 if (tstate != interp->tstate_head || tstate->next != NULL) |
| 793 Py_FatalError("Py_EndInterpreter: not the last thread"); | 796 Py_FatalError("Py_EndInterpreter: not the last thread"); |
| 794 | 797 |
| 795 PyImport_Cleanup(); | 798 PyImport_Cleanup(); |
| 796 PyInterpreterState_Clear(interp); | 799 PyInterpreterState_Clear(interp); |
