Skip to content

WorkerPoolComponent.call method

WorkerPoolComponent › call

Calls a method on the least busy worker.

Signature:

call(method: TMethod, callArguments: Parameters<TApi[TMethod]>, options?: WorkerComponentCallOptions | undefined): Promise<WorkerMethodResult<TApi, TMethod>>

Parameters:

ParameterTypeDescription
methodTMethodThe method name.
callArgumentsParameters<TApi[TMethod]>The method's arguments.
options?WorkerComponentCallOptions | undefinedThe call options.

Returns: Promise<WorkerMethodResult<TApi, TMethod>> — The method's result.