File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -773,11 +773,6 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
773773 Py_CLEAR (interp -> monitoring_callables [t ][e ]);
774774 }
775775 }
776- struct _PyExecutorObject * cold = interp -> cold_executor ;
777- if (cold != NULL ) {
778- interp -> cold_executor = NULL ;
779- _PyExecutor_Free (cold );
780- }
781776 interp -> sys_profile_initialized = false;
782777 interp -> sys_trace_initialized = false;
783778 for (int t = 0 ; t < PY_MONITORING_TOOL_IDS ; t ++ ) {
@@ -820,7 +815,11 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
820815 /* Last garbage collection on this interpreter */
821816 _PyGC_CollectNoFail (tstate );
822817 _PyGC_Fini (interp );
823-
818+ struct _PyExecutorObject * cold = interp -> cold_executor ;
819+ if (cold != NULL ) {
820+ interp -> cold_executor = NULL ;
821+ _PyExecutor_Free (cold );
822+ }
824823 /* We don't clear sysdict and builtins until the end of this function.
825824 Because clearing other attributes can execute arbitrary Python code
826825 which requires sysdict and builtins. */
You can’t perform that action at this time.
0 commit comments