-
Notifications
You must be signed in to change notification settings - Fork 297
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
Support interrupting non-python kernels #8108
Conversation
@@ -92,6 +92,8 @@ export class JupyterSettings implements IWatchableJupyterSettings { | |||
public interactiveWindowMode: InteractiveWindowMode = 'multiple'; | |||
// Hidden settings not surfaced in package.json | |||
public disableZMQSupport: boolean = false; | |||
// Hidden settings not surfaced in package.json | |||
public disablePythonDaemon: boolean = false; |
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.
Added this for testing purposes
return true; | ||
} | ||
if (this._kernelConnectionMetadata.kernelSpec.interrupt_mode === 'message') { | ||
return false; |
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.
the raw kernel process can only interrupt pyton daemon kernels or kernsls that support signal interrupts (not interrupts via messages)
// session: this.realKernel.clientId, | ||
// content: {} | ||
// }) as any) as KernelMessage.IShellMessage<'inspect_request'>; | ||
// await this.realKernel.sendShellMessage<'inspect_request'>(msg, true, true).done; |
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.
This code seems to be right, however I can't find any kernel that implements this even though the protocol supports this.
Hence not sure whether we should enable this or not.
Worse case nothing happens
Commented this out so we can discuss this.
Personally feel its ok to enable this, if there are kernels that support message interrupts (for windows or even unix)
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.
Yeah seems okay to me.
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.
Ok to enable or keep it commented out.
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.
Ok to enable. It doesn't hurt anything AFAICT
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.
Code looks like it's for 'inspect_request'? Isn't that for variables?
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.
Sorry,that part was for generics to work. Jupyter Lab NPM package doesn't support the interrupt_message request in their TS Types.
I changed it and used any
.
The actual payload however is for interrupt request.
bc2076f
to
628276e
Compare
082c2d3
to
3aebce6
Compare
9b07b1e
to
f3a9328
Compare
Closing this PR in favor of https://github.com/microsoft/vscode-jupyter/compare/interruptNonPythonKernels?expand=1 |
For #8107
Basically non-python kernles are not interrupted today as we don't send the sigint signal.