X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=efc1ac916d12eb8693425297fd3e97398648b6a7;hb=c90257c0b2d2c8ebdc6abbee02361cc2ddae36b9;hp=71c0015fed848d4f0855ec42e200be72e7a953e3;hpb=f33c2d55c063a50c0025bf707fa4faf7a5e25f6e;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 71c0015f..efc1ac91 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,4 +1,4 @@ -AbstractWorker | poolifier - v2.6.12
+AbstractWorker | poolifier - v2.6.30
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.12
+
  • The search index is not available
  • poolifier - v2.6.30
    @@ -47,7 +47,7 @@
  • ClusterWorker
  • ThreadWorker
  • +
  • Defined in src/worker/abstract-worker.ts:49
  • @@ -59,11 +59,11 @@

    Properties

    -
    @@ -103,7 +109,7 @@
      - +
    • Constructs a new poolifier worker.

      @@ -111,7 +117,7 @@

      Type Parameters

      • -

        MainWorker extends Worker | MessagePort

      • +

        MainWorker extends MessagePort | Worker

      • Data = unknown

      • @@ -130,17 +136,17 @@
      • -
        taskFunctions: WorkerFunction<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.

        +
        mainWorker: MainWorker
        +

        Reference to main worker.

      • -
        mainWorker: 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 = ...
        +
        opts: WorkerOptions = DEFAULT_WORKER_OPTIONS

        Options for the worker.

      @@ -148,17 +154,17 @@
    +
  • Defined in src/worker/abstract-worker.ts:83
  • Properties

    -
    - -
    aliveInterval?: Timeout
    -

    Handler id of the aliveInterval worker alive check.

    +
    + +
    activeInterval?: Timeout
    +

    Handler id of the activeInterval worker activity check.

    +
  • Defined in src/worker/abstract-worker.ts:73
  • id: number
    @@ -166,7 +172,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:57
  • isMain: boolean
    @@ -174,7 +180,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:85
  • lastTaskTimestamp: number
    @@ -182,23 +188,23 @@
    -
    - +
  • Defined in src/worker/abstract-worker.ts:65
  • +
    +
    mainWorker: MainWorker

    Reference to main worker.

    +
  • Defined in src/worker/abstract-worker.ts:86
  • - -
    opts: WorkerOptions = ...
    + +
    opts: WorkerOptions = DEFAULT_WORKER_OPTIONS

    Options for the worker.

    +
  • Defined in src/worker/abstract-worker.ts:88
  • statistics: WorkerStatistics
    @@ -206,15 +212,15 @@
    +
  • Defined in src/worker/abstract-worker.ts:69
  • -
    taskFunctions: Map<string, WorkerFunction<Data, Response>>
    +
    taskFunctions: Map<string, TaskFunction<Data, Response>>

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

    +
  • Defined in src/worker/abstract-worker.ts:61
  • Methods

    @@ -234,21 +240,21 @@ If a task function with the same name already exists, it is replaced.

  • -
    fn: WorkerFunction<Data, Response>
    +
    fn: TaskFunction<Data, Response>

    The task function to add.

  • Returns boolean

    Whether the task function was added or not.

    -

    Throws

    https://nodejs.org/api/errors.html#class-typeerror If the name parameter is not a string.

    +

    Throws

    https://nodejs.org/api/errors.html#class-typeerror If the name parameter is not a string or an empty string.

    Throws

    https://nodejs.org/api/errors.html#class-error If the name parameter is the default task function reserved name.

    Throws

    https://nodejs.org/api/errors.html#class-typeerror If the fn parameter is not a function.

    +
  • Defined in src/worker/abstract-worker.ts:183
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.1/node_modules/@types/node/async_hooks.d.ts:306
  • Returns TaskPerformance

    +
  • Defined in src/worker/abstract-worker.ts:568
  • -
    - +
  • Defined in node_modules/.pnpm/@types+node@20.5.1/node_modules/@types/node/async_hooks.d.ts:283
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:409
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:592
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:108
  • Returns void

    +
  • Defined in src/worker/abstract-worker.ts:98
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.1/node_modules/@types/node/async_hooks.d.ts:302
  • Returns TaskPerformance

    +
  • Defined in src/worker/abstract-worker.ts:577
  • +
  • Defined in src/worker/abstract-worker.ts:423
  • -

    Returns WorkerFunction<Data, Response>

    The task function.

    +

    Returns TaskFunction<Data, Response>

    The task function.

    Throws

    https://nodejs.org/api/errors.html#class-error If the task function is not found.

    +
  • Defined in src/worker/abstract-worker.ts:559
  • +
  • Defined in src/worker/abstract-worker.ts:455
  • +
    + +
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:167
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:319
  • +
  • Defined in src/worker/abstract-worker.ts:221
  • +
  • Defined in src/worker/abstract-worker.ts:465
  • +
  • Defined in src/worker/abstract-worker.ts:517
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.1/node_modules/@types/node/async_hooks.d.ts:294
  • +
  • Defined in src/worker/abstract-worker.ts:480
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:435
  • -
    - +
  • Defined in src/worker/abstract-worker.ts:275
  • +
    +
    -
    - +
  • Defined in src/worker/abstract-worker.ts:388
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:399
  • -
    - -
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:598
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.1/node_modules/@types/node/async_hooks.d.ts:277