WorkerPoolComponent.callAll method
WorkerPoolComponent › callAll
Calls a method on every worker with the same arguments, for instance to configure them all.Signature:
callAll(method: TMethod, callArguments: Parameters<TApi[TMethod]>, abortSignal?: AbortSignal | undefined): Promise<WorkerMethodResult<TApi, TMethod>[]>Parameters:
| Parameter | Type | Description |
|---|---|---|
| method | TMethod | The method name. |
| callArguments | Parameters<TApi[TMethod]> | The method's arguments, cloned for each worker; nothing can be transferred to all of them. |
| abortSignal? | AbortSignal | undefined | Cancels every call. |
Returns: Promise<WorkerMethodResult<TApi, TMethod>[]> — The results, in worker order.