Skip to content

Commit

Permalink
Merge branch 'tyriar_megan_reconnect' into tyriar/megan
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrogge committed Feb 11, 2021
2 parents 1819dd5 + da39b7a commit cd9704d
Show file tree
Hide file tree
Showing 55 changed files with 1,369 additions and 692 deletions.
21 changes: 21 additions & 0 deletions src/vs/platform/terminal/common/autoOpenBarrier.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { Barrier } from 'vs/base/common/async';

export class AutoOpenBarrier extends Barrier {

private readonly _timeout: any;

constructor(autoOpenTimeMs: number) {
super();
this._timeout = setTimeout(() => this.open(), autoOpenTimeMs);
}

open(): void {
clearTimeout(this._timeout);
super.open();
}
}
Loading

0 comments on commit cd9704d

Please sign in to comment.