mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-30 02:02:41 +01:00
Don't create more than one notebook detection task per-type (#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 #167875
This commit is contained in:
+1
-1
@@ -58,7 +58,7 @@ class NotebookKernelDetection extends Disposable implements IWorkbenchContributi
|
||||
}
|
||||
});
|
||||
|
||||
if (shouldStartDetection) {
|
||||
if (shouldStartDetection && !this._detectionMap.has(notebookType)) {
|
||||
const task = this._notebookKernelService.registerNotebookKernelDetectionTask({
|
||||
notebookType: notebookType
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user