We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6f78188 commit acdd8f1Copy full SHA for acdd8f1
src/greenlet/TThreadStateDestroy.cpp
@@ -103,7 +103,11 @@ struct ThreadState_DestroyNoGIL
103
// segfault if we happen to get context switched, and maybe we should
104
// just always implement our own AddPendingCall, but I'd like to see if
105
// this works first
106
+#if GREENLET_PY313
107
+ if (Py_IsFinalizing()) {
108
+#else
109
if (_Py_IsFinalizing()) {
110
+#endif
111
fprintf(stderr,
112
"greenlet: WARNING: Interpreter is finalizing. Ignoring "
113
"call to Py_AddPendingCall; \n");
0 commit comments