We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dcb709d commit 7fc200bCopy full SHA for 7fc200b
Objects/obmalloc.c
@@ -1109,7 +1109,10 @@ free_delayed(uintptr_t ptr)
1109
#ifndef Py_GIL_DISABLED
1110
free_work_item(ptr);
1111
#else
1112
- if (Py_IsFinalizing() || _PyRuntime.stoptheworld.world_stopped) {
+ PyInterpreterState *interp = _PyInterpreterState_GET();
1113
+ if (_PyInterpreterState_GetFinalizing(interp) != NULL ||
1114
+ interp->stoptheworld.world_stopped)
1115
+ {
1116
// Free immediately during interpreter shutdown or if the world is
1117
// stopped.
1118
0 commit comments