Skip to content

Commit bd3aca8

Browse files
Soften ReadScriptLogLineAsync comment to match root cause
The earlier comment asserted the EOF tight-loop was the cause of the multi-hour Windows hang. Deconfounding analysis disproved that: the hang is the in-box Windows PowerShell attach regression from the 20260614 runner image, not thread-pool starvation here. Keep the yield as genuine harness hardening but describe it as such rather than claiming it as the fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e6242b9 commit bd3aca8

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,11 @@ private async Task<string> ReadScriptLogLineAsync()
239239
}
240240

241241
// Tail the log until a non-empty line is available. The awaited
242-
// delay between reads is essential: at EOF ReadLineAsync completes
243-
// synchronously with null, so without it this becomes a tight loop
244-
// that never releases its thread-pool thread. On constrained CI
245-
// runners that starves the pool, wedging the DAP client's
246-
// background I/O (and the whole test) and defeating both the xUnit
247-
// and harness timeouts so a stall hangs for hours instead of
248-
// failing fast.
242+
// delay between reads matters: at EOF ReadLineAsync completes
243+
// synchronously with null, so without it this is a tight loop that
244+
// never releases its thread-pool thread and needlessly pressures
245+
// the pool on constrained CI runners. Yielding keeps the tail loop
246+
// cheap while we wait for the script to write.
249247
while (true)
250248
{
251249
string nextLine = await scriptLogReader.ReadLineAsync();

0 commit comments

Comments
 (0)