-
Notifications
You must be signed in to change notification settings - Fork 34.9k
Description
When user runs a notebook/cell, the cancel button can be clicked once.
This cancels the CancellationToken
passed into the NotebookKernel.executeCell
.
In Jupyter, clicking interrupt
(stop button) doesn't necessarily work the first time the button is clicked. hence one can click the interrupt
button multiple times.
We'd like the same behavior.
I.e. clicking the cancel
button should trigger a cancellation (either the cancellation token or a cancellation callback).
It is my understanding that cancellation tokens will not trigger the onCancellationRequested
event more than once. Hence the suggestion for a callback or we create a new construct that supports such a notification.
Note: Today we Python extension
have a dedicated interrupt button on the toolbar that can be used to interrupt/stop the kernel at any point. We were planning on using the VS Code stop
icon, however it doesn't trigger callbacks when clicked more than once.
@rebornix /cc