Optionalcollector: WorkerPoolCollector
Present only when the application registered CAPABILITIES.METRICS.
Threaded into every pool this service creates.
Runs a task on the pool for taskModule, creating it lazily.
Module specifier of a defineWorkerTask module
Structured-clonable task input
Optionaloptions: WorkerRunOptions
Per-call options
The task's output
Shuts down every pool (terminating workers, rejecting pending tasks). Safe to call more than once.
Returns a snapshot of every pool created so far.
One TaskPoolStats per task module
The worker pool service registered under
CAPABILITIES.WORKER_POOL.Resolves the worker host once: an injected
options.hostwins over the runtime'sIRuntimeServices.workers. When neither exists (e.g. Cloudflare Workers), the service still constructs —run()throwsWorkerPoolUnavailableError,stats()returns[], andshutdown()resolves — so one codebase stays deployable everywhere. Construction refuses an invalidmaxWorkerswithRangeError, just as the plugin factory does.Since
0.1.0