Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/vs/workbench/services/lifecycle/common/lifecycle.ts')
-rw-r--r--src/vs/workbench/services/lifecycle/common/lifecycle.ts16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/vs/workbench/services/lifecycle/common/lifecycle.ts b/src/vs/workbench/services/lifecycle/common/lifecycle.ts
index 199577ebfde..a8c2c9e2cd6 100644
--- a/src/vs/workbench/services/lifecycle/common/lifecycle.ts
+++ b/src/vs/workbench/services/lifecycle/common/lifecycle.ts
@@ -65,6 +65,11 @@ export interface BeforeShutdownErrorEvent {
readonly error: Error;
}
+export interface IWillShutdownEventJoiner {
+ id: string;
+ label: string;
+}
+
/**
* An event that is send out when the window closes. Clients have a chance to join the closing
* by providing a promise from the join method. Returning a promise is useful in cases of long
@@ -90,10 +95,15 @@ export interface WillShutdownEvent {
* Allows to join the shutdown. The promise can be a long running operation but it
* will block the application from closing.
*
- * @param id to identify the join operation in case it takes very long or never
+ * @param joiner to identify the join operation in case it takes very long or never
* completes.
*/
- join(promise: Promise<void>, id: string): void;
+ join(promise: Promise<void>, joiner: IWillShutdownEventJoiner): void;
+
+ /**
+ * Allows to access the joiners that have not finished joining this event.
+ */
+ joiners(): IWillShutdownEventJoiner[];
/**
* Allows to enforce the shutdown, even when there are
@@ -170,7 +180,7 @@ export const enum LifecyclePhase {
Eventually = 4
}
-export function LifecyclePhaseToString(phase: LifecyclePhase) {
+export function LifecyclePhaseToString(phase: LifecyclePhase): string {
switch (phase) {
case LifecyclePhase.Starting: return 'Starting';
case LifecyclePhase.Ready: return 'Ready';