Skip to content

Commit 78ec091

Browse files
committed
add greenlet 3.0.0 patch
1 parent a80d7f9 commit 78ec091

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/src/greenlet/TThreadStateDestroy.cpp b/src/greenlet/TThreadStateDestroy.cpp
2+
index 645bf52..80e8864 100644
3+
--- a/src/greenlet/TThreadStateDestroy.cpp
4+
+++ b/src/greenlet/TThreadStateDestroy.cpp
5+
@@ -125,6 +125,9 @@ struct ThreadState_DestroyNoGIL
6+
// drop this lock.
7+
LockGuard cleanup_lock(*mod_globs->thread_states_to_destroy_lock);
8+
9+
+#if GRAALVM_PYTHON
10+
+ return; // 'PyInterpreterState_Head()' is not supported
11+
+#else
12+
if (state && state->has_main_greenlet()) {
13+
// Because we don't have the GIL, this is a race condition.
14+
if (!PyInterpreterState_Head()) {
15+
@@ -150,6 +153,7 @@ struct ThreadState_DestroyNoGIL
16+
}
17+
}
18+
}
19+
+#endif
20+
}
21+
22+
static int
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[[rules]]
2+
version = '>= 3.0.0'
3+
patch = 'greenlet-3.0.0.patch'

0 commit comments

Comments
 (0)