Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add onInterrupt to the API #369

Closed
Jolanrensen opened this issue May 17, 2022 · 0 comments
Closed

Add onInterrupt to the API #369

Jolanrensen opened this issue May 17, 2022 · 0 comments
Labels
Milestone

Comments

@Jolanrensen
Copy link
Contributor

Sometimes a cell needs some extra cleanup to be done when the Jupyter kernel is interrupted, such as closing specific threads it spawned etc.
afterCellExecution {} does not appear to be called in this case and when trying to use a finally block (piggybacking on the InterruptedException) in the integration code to make sure the other threads stop, this also gets interrupted (I think).
I, at least, was not able to get a working clean solution.

A block of code that can run after an interrupt of the kernel could solve this as it has some time to clean up and make sure any running process is stopped as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants