Skip to content

Fix O(N^2) worker teardown with pending Atomics.waitAsync waiters - #37280

Open
robobun wants to merge 3 commits into
mainfrom
farm/a54ad958/waitasync-teardown-quadratic
Open

Fix O(N^2) worker teardown with pending Atomics.waitAsync waiters#37280
robobun wants to merge 3 commits into
mainfrom
farm/a54ad958/waitasync-teardown-quadratic

JSCTaskScheduler: drop pending tickets by pointer, not a set scan

7895855
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 9, 2026 in 11m 56s

Code review found 1 potential issue

Found 4 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/js/web/atomics.test.ts:342-362 Subprocess test doesn't pipe stderr or follow Promise.all convention

Annotations

Check warning on line 362 in test/js/web/atomics.test.ts

See this annotation in the file changed.

@claude claude / Claude Code Review

Subprocess test doesn't pipe stderr or follow Promise.all convention

Nit: this deviates from the harness subprocess convention (`Promise.all([stdout.text(), stderr.text(), exited])` and assert a combined `{ stdout, stderr, exitCode }`). stderr isn't piped and stdout is read only after exit — no deadlock risk here (one short JSON line, stderr inherited), but if the fixture ever crashes before printing, the test fails on `JSON.parse("")` with "Unexpected EOF" instead of surfacing the exit code and stderr in the assertion. Piping stderr and asserting `{ stdout, stde