Skip to content

Commit fc9547c

Browse files
committed
Do not swallow interrupt in PythonContext.acquireGil
1 parent ebb1422 commit fc9547c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/PythonContext.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,14 +2450,10 @@ boolean tryAcquireGil() {
24502450
@TruffleBoundary
24512451
void acquireGil() throws InterruptedException {
24522452
assert !ownsGil() : dumpStackOnAssertionHelper("trying to acquire the GIL more than once");
2453-
boolean wasInterrupted = Thread.interrupted();
24542453
globalInterpreterLock.lockInterruptibly();
2455-
if (wasInterrupted) {
2456-
Thread.currentThread().interrupt();
2457-
}
24582454
}
24592455

2460-
static final String dumpStackOnAssertionHelper(String msg) {
2456+
static String dumpStackOnAssertionHelper(String msg) {
24612457
Thread.dumpStack();
24622458
return msg;
24632459
}

0 commit comments

Comments
 (0)