X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;fp=docs%2Fclasses%2FAbstractWorker.html;h=12ee2026f000565d4949c2c1d645a3b2597fb242;hb=16799c66c5ad6869a9234215e97b7ce0346ca624;hp=62d07519ef83be25da752177239cc27e2153b57d;hpb=4f48f6135d7d5e6789e443d293bbaa37fb283562;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 62d07519..12ee2026 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,8 +1,8 @@ -AbstractWorker | poolifier - v3.1.29

Class AbstractWorker<MainWorker, Data, Response>Abstract

Base class that implements some shared logic for all poolifier workers.

+AbstractWorker | poolifier - v3.1.30

Class AbstractWorker<MainWorker, Data, Response>Abstract

Base class that implements some shared logic for all poolifier workers.

Type Parameters

  • MainWorker extends Worker | MessagePort

    Type of main worker.

  • Data = unknown

    Type of data this worker receives from pool's execution. This can only be structured-cloneable data.

  • Response = unknown

    Type of response the worker sends back to the main worker. This can only be structured-cloneable data.

    -

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

activeInterval? id isMain @@ -41,58 +41,58 @@
  • mainWorker: undefined | null | MainWorker

    Reference to main worker.

  • taskFunctions: TaskFunction<Data, Response> | TaskFunctions<Data, Response>

    Task function(s) processed by the worker when the pool's execution function is invoked. The first function is the default function.

  • opts: WorkerOptions = DEFAULT_WORKER_OPTIONS

    Options for the worker.

    -
  • Returns AbstractWorker<MainWorker, Data, Response>

    Properties

    activeInterval?: Timeout

    Handler id of the activeInterval worker activity check.

    -
    id: number

    Worker id.

    -
    isMain: undefined | boolean

    Whether this is the main worker or not.

    -
    lastTaskTimestamp: number

    Timestamp of the last task processed by this worker.

    -
    mainWorker: undefined | null | MainWorker

    Reference to main worker.

    -
    opts: WorkerOptions = DEFAULT_WORKER_OPTIONS

    Options for the worker.

    -
    statistics?: WorkerStatistics

    Performance statistics computation requirements.

    -
    taskFunctions: Map<string, TaskFunction<Data, Response>>

    Task function(s) processed by the worker when the pool's execution function is invoked.

    -

    Methods

    Returns AbstractWorker<MainWorker, Data, Response>

    Properties

    activeInterval?: Timeout

    Handler id of the activeInterval worker activity check.

    +
    id: number

    Worker id.

    +
    isMain: undefined | boolean

    Whether this is the main worker or not.

    +
    lastTaskTimestamp: number

    Timestamp of the last task processed by this worker.

    +
    mainWorker: undefined | null | MainWorker

    Reference to main worker.

    +
    opts: WorkerOptions = DEFAULT_WORKER_OPTIONS

    Options for the worker.

    +
    statistics?: WorkerStatistics

    Performance statistics computation requirements.

    +
    taskFunctions: Map<string, TaskFunction<Data, Response>>

    Task function(s) processed by the worker when the pool's execution function is invoked.

    +

    Methods

    • Returns the main worker.

      +

    Returns void

    • Handles an error and convert it to a string so it can be sent back to the main worker.

      Parameters

      • error: string | Error

        The error raised by the worker.

      Returns string

      The error message.

      -

    Returns void

    Returns void

    Returns void

    Returns void

    Returns void

    Returns void

    Generated using TypeDoc

    \ No newline at end of file +
    \ No newline at end of file