@jetjs/threadpool-tasks
class Registry
Registry for Threadpool tasks
Methods
Method | Return | Description |
---|---|---|
execute(name, opts) | R | |
getInstance() | Registry | |
isRegistered(name) | boolean | |
register(name, task) | void |
Method Details
-
execute(name, opts) Method
Signature:execute<T, R>(name: TaskName, opts: T): R;
Returns:R
Parameter Type Description name TaskName
opts T
-
getInstance() Method
Signature:static getInstance(): Registry;
Returns:Registry
-
isRegistered(name) Method
Signature:isRegistered(name: TaskName): boolean;
Returns:boolean
Parameter Type Description name TaskName
-
register(name, task) Method
Signature:register(name: TaskName, task: Task<any, any>): void;
Returns:void
Parameter Type Description name TaskName
task Task