X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=c3a79eecdf9d5a71e8b0258e53321f43a4f97bbf;hb=665702eef3ad8153279b344e0276687f7f50c10f;hp=f36ce844060615ddc3518fec3c6d085b0faf3983;hpb=323daa7f98fd16385379e4b6e8def0a9a3f140c8;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index f36ce844..c3a79eec 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,13 +1,13 @@ -AbstractWorker | poolifier - v2.6.36
+AbstractWorker | poolifier - v2.6.42
-
+
  • The search index is not available
  • poolifier - v2.6.42 +
    @@ -47,19 +47,19 @@
  • ClusterWorker
  • ThreadWorker
  • +
  • Defined in src/worker/abstract-worker.ts:49
  • - +

    Constructors

    -

    Properties

    -

    Methods

    -
    addTaskFunction +
    addTaskFunction asyncId beginTaskPerformance bind @@ -79,6 +79,7 @@ checkStatistics checkTaskFunctionName checkTaskFunctions +checkValidTaskFunction checkWorkerOptions emitDestroy endTaskPerformance @@ -106,7 +107,7 @@

    Constructors

    - +
    • @@ -127,28 +128,33 @@
    • 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

    @@ -158,7 +164,7 @@
    +
  • 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,7 +188,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:65
  • mainWorker: MainWorker
    @@ -190,7 +196,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:86
  • opts: WorkerOptions = DEFAULT_WORKER_OPTIONS
    @@ -198,7 +204,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:88
  • statistics: WorkerStatistics
    @@ -206,7 +212,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:69
  • taskFunctions: Map<string, TaskFunction<Data, Response>>
    @@ -214,7 +220,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:61
  • Methods

    @@ -231,11 +237,13 @@ 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.

    @@ -246,7 +254,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:193
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.9/node_modules/@types/node/async_hooks.d.ts:306
  • Returns TaskPerformance

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

    Returns Func

    Since

    v14.8.0, v12.19.0

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

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

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

    Returns void

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

    Returns void

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

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

    Returns string

    The error message.

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

    Returns void

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

    Returns void

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

    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:177
  • +
  • Defined in src/worker/abstract-worker.ts:255
  • + +

    Returns void

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

    Returns boolean

    Whether the task function existed and was removed or not.

    @@ -551,7 +585,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:231
  • + +

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

    Returns void

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

    Returns void

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

    Returns void

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

    Returns boolean

    Whether the default task function was set or not.

    @@ -721,7 +765,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:285
  • +
  • Defined in src/worker/abstract-worker.ts:398
  • +
  • Defined in src/worker/abstract-worker.ts:409
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.9/node_modules/@types/node/async_hooks.d.ts:311
  • +
  • Defined in src/worker/abstract-worker.ts:606
  • +
    Optional thisArg: ThisArg

    Returns Func

    Since

    v14.8.0, v12.19.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.9/node_modules/@types/node/async_hooks.d.ts:277
  • @@ -834,6 +880,7 @@ then restore the original execution context.

  • checkStatistics
  • checkTaskFunctionName
  • checkTaskFunctions
  • +
  • checkValidTaskFunction
  • checkWorkerOptions
  • emitDestroy
  • endTaskPerformance
  • @@ -858,70 +905,30 @@ then restore the original execution context.

  • updateLastTaskTimestamp
  • bind
  • +

    Generated using TypeDoc

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