@jetjs/threadpool-tasks

class Registry

Registry for Threadpool tasks

Methods

MethodReturnDescription
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
    ParameterTypeDescription
    name
    TaskName
    opts
    T
  • getInstance() Method

    Signature:
    static getInstance(): Registry;
    Returns:
    Registry
  • isRegistered(name) Method

    Signature:
    isRegistered(name: TaskName): boolean;
    Returns:
    boolean
    ParameterTypeDescription
    name
    TaskName
  • register(name, task) Method

    Signature:
    register(name: TaskName, task: Task<any, any>): void;
    Returns:
    void
    ParameterTypeDescription
    name
    TaskName
    task
    Task