mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
fix stdin cancel breaks notebook (#8012)
This commit is contained in:
@@ -311,6 +311,10 @@ export class CellModel implements ICellModel {
|
|||||||
// If cell is currently running and user clicks the stop/cancel button, call kernel.interrupt()
|
// If cell is currently running and user clicks the stop/cancel button, call kernel.interrupt()
|
||||||
// This matches the same behavior as JupyterLab
|
// This matches the same behavior as JupyterLab
|
||||||
if (this.future && this.future.inProgress) {
|
if (this.future && this.future.inProgress) {
|
||||||
|
// If stdIn is visible, to prevent a kernel hang, we need to send a dummy input reply
|
||||||
|
if (this._stdInVisible && this._stdInHandler) {
|
||||||
|
this.future.sendInputReply({ value: '' });
|
||||||
|
}
|
||||||
this.future.inProgress = false;
|
this.future.inProgress = false;
|
||||||
await kernel.interrupt();
|
await kernel.interrupt();
|
||||||
this.sendNotification(notificationService, Severity.Info, localize('runCellCancelled', "Cell execution cancelled"));
|
this.sendNotification(notificationService, Severity.Info, localize('runCellCancelled', "Cell execution cancelled"));
|
||||||
|
|||||||
Reference in New Issue
Block a user