X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=f36ce844060615ddc3518fec3c6d085b0faf3983;hb=be71219a2e687e8a46a167503df4f5620807db0b;hp=efc1ac916d12eb8693425297fd3e97398648b6a7;hpb=936fa0fb8e70b2c297938cc9455444486b6daa3e;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index efc1ac91..f36ce844 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,4 +1,4 @@ -AbstractWorker | poolifier - v2.6.30
+AbstractWorker | poolifier - v2.6.36
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.30
+
  • The search index is not available
  • poolifier - v2.6.36
    @@ -47,7 +47,7 @@
  • ClusterWorker
  • ThreadWorker
  • +
  • Defined in src/worker/abstract-worker.ts:49
  • @@ -83,7 +83,6 @@ emitDestroy endTaskPerformance getMainWorker -getTaskFunction handleError handleKillMessage handleReadyMessage @@ -128,33 +127,28 @@
  • type: string

    The type of async event.

    -
    -
  • +
  • isMain: boolean

    Whether this is the main worker or not.

    -
    -
  • +
  • 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 = DEFAULT_WORKER_OPTIONS

    Options for the worker.

    -
    -
  • +

    Returns AbstractWorker<MainWorker, Data, Response>

    +
  • Defined in src/worker/abstract-worker.ts:83
  • Properties

    @@ -164,7 +158,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:73
  • id: number
    @@ -172,7 +166,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:57
  • isMain: boolean
    @@ -180,7 +174,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:85
  • lastTaskTimestamp: number
    @@ -188,7 +182,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:65
  • mainWorker: MainWorker
    @@ -196,7 +190,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:86
  • opts: WorkerOptions = DEFAULT_WORKER_OPTIONS
    @@ -204,7 +198,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:88
  • statistics: WorkerStatistics
    @@ -212,7 +206,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:69
  • taskFunctions: Map<string, TaskFunction<Data, Response>>
    @@ -220,7 +214,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:61
  • Methods

    @@ -237,13 +231,11 @@ If a task function with the same name already exists, it is replaced.

  • name: string

    The name of the task function to add.

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

    The task function to add.

    -
    -
  • +

    Returns boolean

    Whether the task function was added or not.

    @@ -254,7 +246,7 @@ If a task function with the same name already exists, it is replaced.

    Throws

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

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

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

    Returns Func

    Since

    v14.8.0, v12.19.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.6/node_modules/@types/node/async_hooks.d.ts:283
  • +
  • Defined in src/worker/abstract-worker.ts:412
  • +

    Returns void

    Throws

    https://nodejs.org/api/errors.html#class-error If the message worker id is not set or does not match the worker id.

    +
  • Defined in src/worker/abstract-worker.ts:378
  • +
  • Defined in src/worker/abstract-worker.ts:592
  • Returns void

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

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:111
  • Returns void

    +
  • Defined in src/worker/abstract-worker.ts:101
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.6/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:426
  • +

    Returns string

    The error message.

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

    Returns void

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

    Returns void

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

    Returns boolean

    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 or an empty string.

    +
  • Defined in src/worker/abstract-worker.ts:170
  • +
  • Defined in src/worker/abstract-worker.ts:248
  • +

    Returns void

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

    Returns boolean

    Whether the task function existed and was removed or not.

    @@ -590,7 +551,7 @@ never be called.

    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:224
  • +

    Returns void

    Throws

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

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

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:533
  • Optional thisArg: This

    The receiver to be used for the function call.

    -
    -
  • +Optional
  • Rest ...args: any[]

    Optional arguments to pass to the function.

    -
    -
  • +Rest

    Returns Result

    Since

    v9.6.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.6/node_modules/@types/node/async_hooks.d.ts:294
  • +

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:496
  • +
  • Defined in src/worker/abstract-worker.ts:445
  • +

    Returns void

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

    Returns boolean

    Whether the default task function was set or not.

    @@ -770,7 +721,7 @@ then restore the original execution context.

    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:278
  • +
  • Defined in src/worker/abstract-worker.ts:391
  • +
  • Defined in src/worker/abstract-worker.ts:402
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.6/node_modules/@types/node/async_hooks.d.ts:311
  • +
  • Defined in src/worker/abstract-worker.ts:598
  • +
    Optional thisArg: ThisArg
    Optional

    Returns Func

    Since

    v14.8.0, v12.19.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.6/node_modules/@types/node/async_hooks.d.ts:277
  • -

    Generated using TypeDoc

    +

    Generated using TypeDoc

    \ No newline at end of file