Interface IWorkerNode<Worker, Data>Internal

Worker node interface.

Type Parameters

  • Worker extends IWorker

    Type of worker.

  • Data = unknown

    Type of data sent to the worker. This can only be structured-cloneable data.

Hierarchy

  • IWorkerNode

Properties

clearTasksQueue: (() => void)

Type declaration

    • (): void
    • Worker node clear tasks queue.

      Returns void

dequeueTask: (() => undefined | Task<Data>)

Type declaration

    • (): undefined | Task<Data>
    • Worker node dequeue task.

      Returns undefined | Task<Data>

      The dequeued task.

enqueueTask: ((task) => number)

Type declaration

    • (task): number
    • Worker node enqueue task.

      Parameters

      • task: Task<Data>

        The task to queue.

      Returns number

      The task queue size.

Worker node worker info.

resetUsage: (() => void)

Type declaration

    • (): void
    • Worker node reset usage statistics .

      Returns void

tasksQueueSize: (() => number)

Type declaration

    • (): number
    • Worker node tasks queue size.

      Returns number

      The tasks queue size.

Worker node worker usage statistics.

worker: Worker

Worker node worker.

Generated using TypeDoc