X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=e72a60c2a90e28cd0ac1ec38c2ba99111b7e170c;hb=447eca603b96bc46303dfa16f3048b68ae576b0c;hp=c2f2854f3ae42c55cd233b0c119469fea9f4c1a0;hpb=dd7dfcc292a646940f5f0263d24d8f5f528e8a51;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index c2f2854f..e72a60c2 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,13 +1,13 @@ -AbstractWorker | poolifier - v2.6.37
+AbstractWorker | poolifier - v2.7.0
-
+
  • The search index is not available
  • poolifier - v2.7.0 +
    @@ -47,19 +47,19 @@
  • ClusterWorker
  • ThreadWorker
  • +
  • Defined in src/worker/abstract-worker.ts:50
  • - +

    Constructors

    -

    Properties

    -

    Methods

    -
    addTaskFunction + +
  • 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:84
  • Properties

    @@ -159,7 +165,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:74
  • id: number
    @@ -167,7 +173,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:58
  • isMain: boolean
    @@ -175,7 +181,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:86
  • lastTaskTimestamp: number
    @@ -183,7 +189,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:66
  • mainWorker: MainWorker
    @@ -191,7 +197,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:87
  • opts: WorkerOptions = DEFAULT_WORKER_OPTIONS
    @@ -199,7 +205,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:89
  • statistics: WorkerStatistics
    @@ -207,7 +213,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:70
  • taskFunctions: Map<string, TaskFunction<Data, Response>>
    @@ -215,13 +221,13 @@
    +
  • Defined in src/worker/abstract-worker.ts:62
  • 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 or an empty 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:221
  • +
  • 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:632
  • + +

    Returns Func

    Since

    v14.8.0, v12.19.0

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

    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:449
  • +
  • Defined in src/worker/abstract-worker.ts:656
  • Returns void

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

    Returns void

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

    Returns void

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

    +
  • Defined in src/worker/abstract-worker.ts:102
  • +
  • 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:641
  • +
  • Defined in src/worker/abstract-worker.ts:498
  • Returns string

    The error message.

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

    Returns void

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

    Returns void

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

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

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

    Returns void

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

    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 or an empty 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:256
  • + +

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

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:600
  • 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.6.2/node_modules/@types/node/async_hooks.d.ts:295
  • + +

    Returns void

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

    Returns void

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

    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 or an empty 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 default task function was set or not.

    -

    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:312
  • +
  • Defined in src/worker/abstract-worker.ts:462
  • +
  • Defined in src/worker/abstract-worker.ts:473
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:312
  • +
  • Defined in src/worker/abstract-worker.ts:662
  • +
    Optional thisArg: ThisArg

    Returns Func

    Since

    v14.8.0, v12.19.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:278
  • @@ -852,7 +874,7 @@ then restore the original execution context.

  • checkStatistics
  • checkTaskFunctionName
  • checkTaskFunctions
  • -
  • checkValidTaskFunction
  • +
  • checkValidTaskFunctionEntry
  • checkWorkerOptions
  • emitDestroy
  • endTaskPerformance
  • @@ -860,15 +882,16 @@ then restore the original execution context.

  • handleError
  • handleKillMessage
  • handleReadyMessage
  • +
  • handleTaskFunctionOperationMessage
  • hasTaskFunction
  • -
  • listTaskFunctions
  • +
  • listTaskFunctionNames
  • messageListener
  • removeTaskFunction
  • run
  • runAsync
  • runInAsyncScope
  • runSync
  • -
  • sendTaskFunctionsListToMainWorker
  • +
  • sendTaskFunctionNamesToMainWorker
  • sendToMainWorker
  • setDefaultTaskFunction
  • startCheckActive
  • @@ -877,71 +900,30 @@ then restore the original execution context.

  • updateLastTaskTimestamp
  • bind
  • +

    Generated using TypeDoc

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