hook up execution task cancellation from controllers

This commit is contained in:
Johannes Rieken
2021-04-16 10:51:45 +02:00
parent 644e1d0bc4
commit 8877d8ca94
2 changed files with 11 additions and 1 deletions

View File

@@ -223,6 +223,16 @@ export class ExtHostNotebookKernels implements ExtHostNotebookKernelsShape {
if (obj.controller.interruptHandler) {
obj.controller.interruptHandler(document.notebookDocument);
}
// we do both? interrupt and cancellation or should we be selective?
for (const range of ranges) {
for (let i = range.start; i < range.end; i++) {
const cell = document.getCellFromIndex(i);
if (cell) {
this._extHostNotebook.cancelOneNotebookCellExecution(cell);
}
}
}
}
$acceptRendererMessage(handle: number, editorId: string, message: any): void {