Skip to content

Commit 5f54c43

Browse files
colinblaiseColin Blaise
and
Colin Blaise
authored
Add Thread.Sleep(100) to throttle REPL when it's non-interactive (#1694)
Co-authored-by: Colin Blaise <cblaise@immense.net>
1 parent e4bc693 commit 5f54c43

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,8 @@ private void DoOneRepl(CancellationToken cancellationToken)
600600
{
601601
if (!_hostInfo.ConsoleReplEnabled)
602602
{
603+
// Throttle the REPL loop with a sleep because we're not interactively reading input from the user.
604+
Thread.Sleep(100);
603605
return;
604606
}
605607

0 commit comments

Comments
 (0)