Skip to content

Keep the kernel alive when a SystemExit escapes an asyncio task - #12

Merged
jph00 merged 1 commit into
mainfrom
pr/keep-the-kernel-alive-when-a-systemexit-escapes
Sep 2, 2026
Merged

jph00 merged 1 commit into
mainfrom
pr/keep-the-kernel-alive-when-a-systemexit-escapes

Conversation

@jph00

@jph00 jph00 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

asyncio re-raises a SystemExit from a task out of the event loop instead of storing it on the task, so a library call that raised one under asyncio.gather ended the kernel process. kernmini._bridge.run_loop now drives the main loop and every child loop, re-entering after such an exit, and the cell that gathered the task completes with the exception in its results. The IPython story in the tests covers the main shell and a subshell, and the test kernel now launches through the public kernmini.run_kernel. See DEV.md, Python adapter.

@jph00 jph00 added the bug Something isn't working label Sep 2, 2026
@jph00
jph00 merged commit b2d4228 into main Sep 2, 2026
@jph00
jph00 deleted the pr/keep-the-kernel-alive-when-a-systemexit-escapes branch September 2, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant