@jetjs/threadpool
class WorkerTaskExecutorPool
Manages the Pool with WorkerThreads
Methods
Method | Return | Description |
---|---|---|
addTaskConfiguration(config) | void | |
isTerminated() | boolean | |
shutdown() | Promise | |
submit(taskDef) | Promise |
Method Details
-
addTaskConfiguration(config) Method
Signature:addTaskConfiguration(...config: TaskConfiguration[]): void;
Returns:void
Parameter Type Description config TaskConfiguration[]
-
isTerminated() Method
Signature:isTerminated(): boolean;
Returns:boolean
-
shutdown() Method
Signature:shutdown(): Promise<void>;
Returns:Promise
-
submit(taskDef) Method
Signature:submit<P, R>(taskDef: TaskDefinition<P>): Promise<R>;
Returns:Promise
Parameter Type Description taskDef TaskDefinition