A pool of worker threads executing task modules off the event loop.
A task module is an ES module owned by the application that registers its
handler via defineWorkerTask (from @setu-ts/runtime/worker).
Tasks are addressed by module specifier — never by closure, because
functions cannot cross a thread boundary. Inputs and outputs travel by
structured clone.
run<TInput, TOutput>(): Promise<TOutput>
Runs a task on a pool worker for the given task module, creating the pool lazily on first use.
stats(): readonly TaskPoolStats[]
Returns a snapshot of every pool created so far.
shutdown(): Promise<void>
Terminates every worker in every pool and rejects pending tasks. Called
by the plugin's onClose hook; safe to call more than once.