Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add waitUntil for onDidStart event #16375

Merged
merged 19 commits into from
Jan 20, 2025
12 changes: 11 additions & 1 deletion src/api.proposed.kernelStartHook.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

import type { Event, Uri } from 'vscode';
import type { CancellationToken, Event, Uri } from 'vscode';

declare module './api' {
export interface Kernels {
Expand All @@ -11,6 +11,16 @@ declare module './api' {
onDidStart: Event<{
uri: Uri;
kernel: Kernel;
token: CancellationToken;
/**
* Allows to pause the event loop until the provided thenable resolved.
* This can be useful to ensure startup code is executed before user code.
*
* *Note:* This function can only be called during event dispatch.
*
* @param thenable A thenable that delays kernel startup.
*/
waitUntil(thenable: Thenable<unknown>): void;
}>;
}
}
Loading
Loading