Antoine Pitrou added the comment: > What happens if the GIL is relased during shutdown?
In PyEval_RestoreThread(), any thread other than the main thread trying to take the GIL will immediately exit: take_gil(tstate); if (_Py_Finalizing && tstate != _Py_Finalizing) { drop_gil(tstate); PyThread_exit_thread(); assert(0); /* unreachable */ } > The TLS dict is deallocated after having cleared the frame, which > could lead to surprises, no? I don't know. Can you think of a situation where there is a problem? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17263> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com