Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The trio runner didn't support kernel interrupts: it would just continue to hang. I'm not sure why, but kernelapp.py ignores SIGINT. So in this commit, the Trio runner registers a new SIGINT handler that uses Trio cancel scopes to cancel the currently executing cell. The downside to this approach is that if a cell hangs in a loop that never reaches a Trio checkpoint, then the cancellation will have no effect. We could have sent SIGINT to the main thread (i.e. SIG_DFL), but that would have the effect of potentially raising SIGINT on one of the background tasks, which would likely force you to restart the kernel.
- Loading branch information