Offload functions to worker threads with shared memory primitives for Node.js.
8
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: abort setTimeout when shutdown race is won by settle

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+3 -2
+3 -2
src/worker-pool.ts
··· 78 78 ac.abort(); 79 79 const settle = Promise.allSettled(inflight); 80 80 if (opts?.shutdownTimeout != null) { 81 + const timeoutAc = new AbortController(); 81 82 await Promise.race([ 82 - settle, 83 - setTimeout(opts.shutdownTimeout), 83 + settle.finally(() => timeoutAc.abort()), 84 + setTimeout(opts.shutdownTimeout, undefined, { signal: timeoutAc.signal }).catch(() => {}), 84 85 ]); 85 86 } else { 86 87 await settle;