X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=489320bfd0ef992208723b7c0c4fcb2b9d9801e1;hb=76a3a76becd6ac41efb3271c708431a666828c30;hp=92049352f6afb6c487ec7e5d9d563bfcb3810c21;hpb=52f4e8137eab5d72c663eb9ae9289c08d804e559;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 92049352..489320bf 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,13 +1,13 @@ -AbstractWorker | poolifier - v2.6.12
+AbstractWorker | poolifier - v2.7.1
-
+
  • The search index is not available
  • poolifier - v2.7.1 +
    @@ -47,62 +47,68 @@
  • ClusterWorker
  • ThreadWorker
  • +
  • Defined in src/worker/abstract-worker.ts:55
  • - +

    Constructors

    - +
      - +
    • Constructs a new poolifier worker.

      @@ -110,7 +116,7 @@

      Type Parameters

      • -

        MainWorker extends Worker | MessagePort

      • +

        MainWorker extends MessagePort | Worker

      • Data = unknown

      • @@ -129,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.

  • @@ -147,17 +153,17 @@
    +
  • Defined in src/worker/abstract-worker.ts:89
  • 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:79
  • id: number
    @@ -165,7 +171,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:63
  • isMain: boolean
    @@ -173,7 +179,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:91
  • lastTaskTimestamp: number
    @@ -181,23 +187,23 @@
    -
    - +
  • Defined in src/worker/abstract-worker.ts:71
  • +
    +
    mainWorker: MainWorker

    Reference to main worker.

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

    Options for the worker.

    +
  • Defined in src/worker/abstract-worker.ts:94
  • statistics: WorkerStatistics
    @@ -205,21 +211,21 @@
    +
  • Defined in src/worker/abstract-worker.ts:75
  • -
    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:67
  • Methods

    -

    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-error If the name parameter is the default task function reserved name.

    +

    Returns TaskFunctionOperationResult

    Whether the task function was added or not.

    -

    Throws

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

    -
    +
  • Defined in src/worker/abstract-worker.ts:179
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:307
  • Returns TaskPerformance

    +
  • Defined in src/worker/abstract-worker.ts:587
  • -
    - +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:284
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:439
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:611
  • +
  • Defined in src/worker/abstract-worker.ts:118
  • Returns void

    +
  • Defined in src/worker/abstract-worker.ts:108
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:303
  • Returns TaskPerformance

    +
  • Defined in src/worker/abstract-worker.ts:596
  • +
    + +
    -
    - -
    +
    + +
    -
    - +
  • Defined in src/worker/abstract-worker.ts:371
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:299
  • +
    + +
    -

    Returns boolean

    Whether the worker has a task function with the given name or not.

    +

    Returns TaskFunctionOperationResult

    Whether the worker has a task function with the given name or not.

    -
    -

    Throws

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

    -
    +
  • Defined in src/worker/abstract-worker.ts:162
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:306
  • -

    Returns boolean

    Whether the task function existed and was removed 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-error If the name parameter is the default task function reserved name.

    +

    Returns TaskFunctionOperationResult

    Whether the task function existed and was removed or not.

    -

    Throws

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

    -
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:494
  • +
  • Defined in src/worker/abstract-worker.ts:555
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:295
  • +
  • Defined in src/worker/abstract-worker.ts:521
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:466
  • -

    Returns boolean

    Whether the default task function was set or not.

    - -
    -

    Throws

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

    +

    Returns TaskFunctionOperationResult

    Whether the default task function was set or not.

    -

    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-error If the name parameter is a non-existing task function.

    -
    -
    - +
  • Defined in src/worker/abstract-worker.ts:270
  • +
    +
    -
    - +
  • Defined in src/worker/abstract-worker.ts:418
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:429
  • -
    - -
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:617
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:278
  • @@ -745,11 +825,11 @@ then restore the original execution context.

    +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file