X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=0683a5af336cdebcc505b70b02630e15e2f13dfb;hb=8735b4e51c0cfabc9612d57417834d42042cab4e;hp=2fe528e337366b26aeb513f8e8db91df4d8e80f0;hpb=3db479d12e6d8dff22ca35537d96af8d6830ff13;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 2fe528e3..0683a5af 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,4 +1,4 @@ -AbstractWorker | poolifier - v2.6.14
+AbstractWorker | poolifier - v2.6.29
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.14
+
  • The search index is not available
  • poolifier - v2.6.29
    @@ -103,7 +108,7 @@
      - +
    • Constructs a new poolifier worker.

      @@ -111,7 +116,7 @@

      Type Parameters

      • -

        MainWorker extends Worker | MessagePort

      • +

        MainWorker extends MessagePort | Worker

      • Data = unknown

      • @@ -130,17 +135,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,7 +153,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:83
  • Properties

    @@ -158,7 +163,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:73
  • id: number
    @@ -166,7 +171,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:57
  • isMain: boolean
    @@ -174,7 +179,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:85
  • lastTaskTimestamp: number
    @@ -182,23 +187,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 +211,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 +239,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:188
  • +
  • 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:579
  • +
  • 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:420
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:603
  • +
  • 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:588
  • +
  • Defined in src/worker/abstract-worker.ts:434
  • -

    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:570
  • +
  • Defined in src/worker/abstract-worker.ts:466
  • +
    + +
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:167
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:330
  • +
  • Defined in src/worker/abstract-worker.ts:231
  • +
  • Defined in src/worker/abstract-worker.ts:476
  • +
  • Defined in src/worker/abstract-worker.ts:528
  • +
  • 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:491
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:453
  • +
  • Defined in src/worker/abstract-worker.ts:446
  • +
  • Defined in src/worker/abstract-worker.ts:290
  • +
  • Defined in src/worker/abstract-worker.ts:399
  • +
  • Defined in src/worker/abstract-worker.ts:410
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.1/node_modules/@types/node/async_hooks.d.ts:311
  • +
    + +
    +
  • Defined in node_modules/.pnpm/@types+node@20.5.1/node_modules/@types/node/async_hooks.d.ts:277