Combine two optional AbortSignals into a single scoped one that fires
when either trips. Pure helper lifted from WorkerPool.combineSignals.
Uses native AbortSignal.any when available (modern browsers /
Node 20+) and falls back to a manual "trip either one" wiring for
older runtimes. The fallback registers listeners on both sources, so
callers must invoke dispose() when the call using signal settles —
the pool-wide signal lives for a whole dataset session, and without
disposal every worker call would retain one relay closure on it. An
abort removes both source listeners immediately before relaying.
Combine two optional AbortSignals into a single scoped one that fires when either trips. Pure helper lifted from
WorkerPool.combineSignals.Uses native
AbortSignal.anywhen available (modern browsers / Node 20+) and falls back to a manual "trip either one" wiring for older runtimes. The fallback registers listeners on both sources, so callers must invokedispose()when the call usingsignalsettles — the pool-wide signal lives for a whole dataset session, and without disposal every worker call would retain one relay closure on it. An abort removes both source listeners immediately before relaying.