tools: wait for test processes instead of polling · nodejs/node@e3f861b · GitHub
Skip to content

Commit e3f861b

Browse files
mcollinaclaude
authored andcommitted
tools: wait for test processes instead of polling
RunProcess polled the child with an exponential backoff that capped at 100 ms, so every test longer than roughly 300 ms paid 30-75 ms of latency after it had already exited. Across the parallel suite that adds up to about 160 thread-seconds. Block in wait() instead and let a timer thread deliver the kill when the timeout is crossed. Set the shutdown flag from the SIGINT handler so a worker whose child died from the same ctrl-c does not report it as a failure before the main thread aborts the run. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UH48w8TCtYmHd4P2UE6HEY Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: #66432 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
1 parent 021f7d8 commit e3f861b

1 file changed

Lines changed: 28 additions & 25 deletions

File tree

‎tools/test.py‎

Lines changed: 28 additions & 25 deletions

0 commit comments

Comments
 (0)