diff options
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 5766b2385e..08b0d834ce 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -467,11 +467,6 @@ Py_Finalize(void) _Py_PrintReferences(stderr); #endif /* Py_TRACE_REFS */ - /* Cleanup auto-thread-state */ -#ifdef WITH_THREAD - _PyGILState_Fini(); -#endif /* WITH_THREAD */ - /* Clear interpreter state */ PyInterpreterState_Clear(interp); @@ -483,6 +478,11 @@ Py_Finalize(void) _PyExc_Fini(); + /* Cleanup auto-thread-state */ +#ifdef WITH_THREAD + _PyGILState_Fini(); +#endif /* WITH_THREAD */ + /* Delete current thread */ PyThreadState_Swap(NULL); PyInterpreterState_Delete(interp); |