One task per worker at a time; extra tasks queue inside the
pool (size the pool to match your batch concurrency). Payloads
and values must be structured-cloneable — Blobs and ArrayBuffers
are, which is what image work needs. A worker script for
@dusrel/image-core's handler is a three-line adapter (see the
README).
A pool of real Web Workers speaking a tiny RPC protocol:
request: { id, payload } response: { id, ok: true, value } | { id, ok: false, error }
One task per worker at a time; extra tasks queue inside the pool (size the pool to match your batch concurrency). Payloads and values must be structured-cloneable — Blobs and ArrayBuffers are, which is what image work needs. A worker script for @dusrel/image-core's handler is a three-line adapter (see the README).