Skip to content

Commit 0b44f09

Browse files
committed
when the context shuts down cleanly, we'd like to shutdown our async handler threads, too
1 parent d1f7beb commit 0b44f09

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,8 @@ private void processAsyncActions() {
231231
}
232232
}
233233
}
234+
235+
public void shutdown() {
236+
executorService.shutdownNow();
237+
}
234238
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ public void deregisterShutdownHook(Object callable) {
288288

289289
@TruffleBoundary
290290
public void runShutdownHooks() {
291+
handler.shutdown();
291292
for (CallTarget f : atExitHooks.values()) {
292293
f.call();
293294
}

0 commit comments

Comments
 (0)