WorkerPool / injectWorkerPool

Manages a pool of Web Workers with round-robin job dispatch. `injectWorkerPool` is the DI-aware factory that automatically terminates all workers when the injection context is destroyed. Used internally by `@angular-helpers/security` to run ReDoS-safe regex operations off the main thread.

TypeScriptexample.ts
import { WorkerPool / injectWorkerPool } from '@angular-helpers/core'

# Methods

MethodSignatureReturnsDescription
executeexecute(type: string, data: any, timeoutMsOrOptions?: number | { timeoutMs?: number; transfer?: Transferable[] }): Promise<T>Promise<T>Executes a task in the worker
terminateterminate(): voidvoidPublic method terminate.
LCP N/A
CLS N/A
INP N/A