File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1669,12 +1669,14 @@ executor_clear(PyObject *op)
16691669 * free the executor unless we hold a strong reference to it
16701670 */
16711671 _PyExecutorObject * cold = _PyExecutor_GetColdExecutor ();
1672+ _PyExecutorObject * cold_dynamic = _PyExecutor_GetColdDynamicExecutor ();
16721673 Py_INCREF (executor );
16731674 for (uint32_t i = 0 ; i < executor -> exit_count ; i ++ ) {
16741675 executor -> exits [i ].temperature = initial_unreachable_backoff_counter ();
16751676 _PyExecutorObject * e = executor -> exits [i ].executor ;
1676- executor -> exits [i ].executor = cold ;
1677- Py_DECREF (e );
1677+ if (e != cold && e != cold_dynamic ) {
1678+ executor_clear (e );
1679+ }
16781680 }
16791681 _Py_ExecutorDetach (executor );
16801682 Py_DECREF (executor );
You can’t perform that action at this time.
0 commit comments