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 075412b commit 3a7f9dcCopy full SHA for 3a7f9dc
graalpython/com.oracle.graal.python.cext/src/pystate.c
@@ -115,3 +115,16 @@ int PyState_RemoveModule(struct PyModuleDef* def) {
115
// TODO(fa): implement
116
return 0;
117
}
118
+
119
+// This function has a different implementation on NFI in capi_native.c
120
+PyAPI_FUNC(PyGILState_STATE) PyGILState_Ensure() {
121
+ int res = GraalPyTruffleGILState_Ensure();
122
+ return res ? PyGILState_LOCKED : PyGILState_UNLOCKED;
123
+}
124
125
126
+PyAPI_FUNC(void) PyGILState_Release(PyGILState_STATE state) {
127
+ if (state == PyGILState_LOCKED) {
128
+ GraalPyTruffleGILState_Release();
129
+ }
130
0 commit comments