From 56eabd978eeff51dc7d214f13ab7a5ca8845d9aa Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Fri, 27 Sep 2024 09:51:29 -0700 Subject: [PATCH] Remove spawn throttle when using conpty.dll Fixes #229982 --- src/vs/platform/terminal/node/terminalProcess.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/platform/terminal/node/terminalProcess.ts b/src/vs/platform/terminal/node/terminalProcess.ts index 3435742e5f582..d7a470d5bf6e1 100644 --- a/src/vs/platform/terminal/node/terminalProcess.ts +++ b/src/vs/platform/terminal/node/terminalProcess.ts @@ -50,7 +50,7 @@ const enum Constants { */ KillSpawnThrottleInterval = 250, /** - * The amount of time to wait when a call is throttles beyond the exact amount, this is used to + * The amount of time to wait when a call is throttled beyond the exact amount, this is used to * try prevent early timeouts causing a kill/spawn call to happen at double the regular * interval. */ @@ -388,6 +388,10 @@ export class TerminalProcess extends Disposable implements ITerminalChildProcess if (!isWindows || !('useConpty' in this._ptyOptions) || !this._ptyOptions.useConpty) { return; } + // Don't throttle when using conpty.dll as it seems to have been fixed in later versions + if (this._ptyOptions.useConptyDll) { + return; + } // Use a loop to ensure multiple calls in a single interval space out while (Date.now() - TerminalProcess._lastKillOrStart < Constants.KillSpawnThrottleInterval) { this._logService.trace('Throttling kill/spawn call');