-
-
Notifications
You must be signed in to change notification settings - Fork 372
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 Support for Message Based Interrupt #741
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, thank you!
Thanks for this! |
I think this is not enough because it's missing a call to perform the request in jupyter_client, just like there's one for shutdown: Otherwise, how is it possible to perform an interrupt from the kernel client? |
Hi @ccordoba12 - the interrupt machinery comes from the Hmm - should we make signal-based interrupts the |
According to the docs, it is opt-in: "For this to work, the kernels kernelspec must set interrupt_mode to message". I think the question is whether the |
ok - I understood the question to be one of missing logic - sorry about that. My question was more general and I just found the answer in that 'signal' will be used if I'll let the maintainers decide what the default mode should be. 😄 |
Yeah, but if you connect to a kernel started elsewhere (for example, locally to a kernel in a server, which Spyder users do a lot), then you don't have access to a kernel manager, just a kernel client. And in that case it'd be really nice to be able to send an interrupt message using the control channel (like you can now to perform a shutdown with the method I referenced above). I thought this PR was about that, but it seems I was mistaken, sorry. |
I'm sorry, I probably steered this discussion in the wrong direction and I apologize. Please continue. |
No worries @kevin-bates. Let's ping @davidbrochart to see what he thinks about this one. @davidbrochart, do you think it's worth it to add a message-based interrupt in jupyter-client? |
I think it is worth it just for the sake of completeness. |
Agreed. I'll open a PR in jupyter-client so that (hopefully) it can be part of its 7.0 version. |
Implements handling of
interrupt_request
message, which is now possible due to the control channel being on a separate thread.Does not implement handling on Windows, which is less likely to be used for remote kernels.