File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1911,16 +1911,16 @@ Py_FinalizeEx(void)
1911
1911
int malloc_stats = tstate -> interp -> config .malloc_stats ;
1912
1912
#endif
1913
1913
1914
+ /* Ensure that remaining threads are detached */
1915
+ _PyEval_StopTheWorldAll (runtime );
1916
+
1914
1917
/* Remaining daemon threads will automatically exit
1915
1918
when they attempt to take the GIL (ex: PyEval_RestoreThread()). */
1916
1919
_PyInterpreterState_SetFinalizing (tstate -> interp , tstate );
1917
1920
_PyRuntimeState_SetFinalizing (runtime , tstate );
1918
1921
runtime -> initialized = 0 ;
1919
1922
runtime -> core_initialized = 0 ;
1920
1923
1921
- /* Ensure that remaining threads are detached */
1922
- _PyEval_StopTheWorldAll (runtime );
1923
-
1924
1924
// XXX Call something like _PyImport_Disable() here?
1925
1925
1926
1926
/* Destroy the state of all threads of the interpreter, except of the
You can’t perform that action at this time.
0 commit comments