Skip to content

Commit 18aca84

Browse files
committed
Fix: when locking C API init lock we should release the GIL not acquire
1 parent 8f89cbe commit 18aca84

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/CApiContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ public static CApiContext ensureCapiWasLoaded(Node node, PythonContext context,
922922
AbstractImportNode.importModule(toTruffleStringUncached("types"));
923923

924924
ReentrantLock initLock = context.getcApiInitializationLock();
925-
try (var ignored = GilNode.uncachedAcquire()) {
925+
try (GilNode.UncachedRelease ignored = GilNode.uncachedRelease()) {
926926
TruffleSafepoint.setBlockedThreadInterruptible(node, ReentrantLock::lockInterruptibly, initLock);
927927
}
928928
try {

0 commit comments

Comments
 (0)