Skip to content

Add support for multiple cancellations in Notebook stop button #99203

@DonJayamanne

Description

@DonJayamanne

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

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code Insidersnotebookverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions