File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 41
41
42
42
package com .oracle .graal .python .runtime ;
43
43
44
+ import com .oracle .graal .python .runtime .exception .PythonExitException ;
45
+ import com .oracle .graal .python .runtime .exception .PythonThreadKillException ;
44
46
import com .oracle .truffle .api .CompilerDirectives .TruffleBoundary ;
45
47
import com .oracle .truffle .api .TruffleSafepoint ;
46
48
import com .oracle .truffle .api .dsl .NeverDefault ;
@@ -90,6 +92,8 @@ public boolean acquire(PythonContext context, Node location) {
90
92
if (binaryProfile .profile (!context .ownsGil ())) {
91
93
try {
92
94
TruffleSafepoint .setBlockedThreadInterruptible (location , PythonContext ::acquireGil , context );
95
+ } catch (PythonThreadKillException | PythonExitException | ThreadDeath e ) {
96
+ throw e ;
93
97
} catch (Throwable t ) {
94
98
/*
95
99
* Safepoint actions may throw exceptions, so we need to make sure that we
@@ -141,6 +145,8 @@ public final boolean acquire(PythonContext context, Node location) {
141
145
if (!context .tryAcquireGil ()) {
142
146
try {
143
147
TruffleSafepoint .setBlockedThreadInterruptible (location , PythonContext ::acquireGil , context );
148
+ } catch (PythonThreadKillException | PythonExitException | ThreadDeath e ) {
149
+ throw e ;
144
150
} catch (Throwable t ) {
145
151
/*
146
152
* Safepoint actions may throw exceptions, so we need to make sure that we
You can’t perform that action at this time.
0 commit comments