Commit a87b922
test(wasm-worker): TS worker true-parallelism proof (peakConcurrency=4)
test-ts-worker.mjs: scan ts_probe (maxWorkers=4) once under threads=4 — one scan fans out
across N worker: connections => N slots => N dedicated SLOT sub-Workers, each CPU-busy-
looping under a shared concurrency guard — then read ts_peek. Assert peak >= 2 (observed
4). Since a busy loop blocks a single async event loop (peak would be 1), this proves the
TS SAB worker serves N slots on real parallel threads, matching the Rust worker.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S2jkoYMNsNYkcpSh6Fwk2c1 parent 13dcce5 commit a87b922
2 files changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
153 | 154 | | |
154 | 155 | | |
155 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
57 | 70 | | |
58 | | - | |
| 71 | + | |
59 | 72 | | |
60 | 73 | | |
61 | 74 | | |
| |||
0 commit comments