Skip to content

Commit

Permalink
Merge pull request #229984 from microsoft/tyriar/229982
Browse files Browse the repository at this point in the history
Remove spawn throttle when using conpty.dll
  • Loading branch information
Tyriar committed Sep 27, 2024
2 parents ceba479 + 56eabd9 commit c27536c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vs/platform/terminal/node/terminalProcess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit c27536c

Please sign in to comment.