Skip to content

Commit 0822952

Browse files
committed
PythonContext: daemon thread killing: exit early if thread is killed
1 parent 4880ca1 commit 0822952

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -877,7 +877,7 @@ private void shutdownThreads() {
877877
// the threading module above. So we just interrupt them. Their exit is handled
878878
// in the acquireGil function, which will be interrupted for these threads
879879
disposeThread(thread);
880-
for (int i = 0; i < 100; i++) {
880+
for (int i = 0; i < 100 && thread.isAlive(); i++) {
881881
thread.interrupt();
882882
thread.join(2);
883883
}

0 commit comments

Comments
 (0)