Skip to content

Commit fa2d8d9

Browse files
authored
Don't create more than one notebook detection task per-type (microsoft#167878)
Don't create more than one notebook detection task per-type. This is creating detection tasks to cover the period between opening a notebook, and the notebook extension activating and starting its own detection task. This code is a bit more complex than necessary, and it would be simpler to manage the lifecycle of this task from the `activateByEvent` promise. Fix microsoft#167875
1 parent 9b3371e commit fa2d8d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vs/workbench/contrib/notebook/browser/contrib/kernelDetection/notebookKernelDetection.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class NotebookKernelDetection extends Disposable implements IWorkbenchContributi
5858
}
5959
});
6060

61-
if (shouldStartDetection) {
61+
if (shouldStartDetection && !this._detectionMap.has(notebookType)) {
6262
const task = this._notebookKernelService.registerNotebookKernelDetectionTask({
6363
notebookType: notebookType
6464
});

0 commit comments

Comments
 (0)