X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=597f0599a8fc4fae1c16ea37feed4727024bb63a;hb=2de80350c43436f87fca7de401d213c0d93fe208;hp=f9788a8cdc561b2de2b8362001b31371287f084c;hpb=adab53c70d781f8c26e35b7359efa3d05c278fa8;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index f9788a8c..597f0599 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,13 +1,13 @@ -AbstractWorker | poolifier - v2.6.39
+AbstractWorker | poolifier - v2.6.45
-
+
  • The search index is not available
  • poolifier - v2.6.45 +
    @@ -47,19 +47,19 @@
  • ClusterWorker
  • ThreadWorker
  • +
  • Defined in src/worker/abstract-worker.ts:49
  • - +

    Constructors

    -

    Properties

    -

    Methods

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

    Constructors

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

    @@ -159,7 +164,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:73
  • id: number
    @@ -167,7 +172,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:57
  • isMain: boolean
    @@ -175,7 +180,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:85
  • lastTaskTimestamp: number
    @@ -183,7 +188,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:65
  • mainWorker: MainWorker
    @@ -191,7 +196,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:86
  • opts: WorkerOptions = DEFAULT_WORKER_OPTIONS
    @@ -199,7 +204,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:88
  • statistics: WorkerStatistics
    @@ -207,7 +212,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:69
  • taskFunctions: Map<string, TaskFunction<Data, Response>>
    @@ -215,7 +220,7 @@
    +
  • Defined in src/worker/abstract-worker.ts:61
  • Methods

    @@ -232,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.

    @@ -247,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:220
  • +
  • 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:601
  • + +

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

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

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

    Returns void

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

    Returns void

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

    +
  • Defined in src/worker/abstract-worker.ts:101
  • +
  • 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:610
  • +
  • Defined in src/worker/abstract-worker.ts:461
  • Returns string

    The error message.

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

    Returns void

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

    Returns void

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

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

    Returns void

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

    Returns boolean

    Whether the task function existed and was removed or not.

    @@ -569,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:258
  • + +

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

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:567
  • 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:531
  • +
  • Defined in src/worker/abstract-worker.ts:480
  • + +

    Returns void

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

    Returns boolean

    Whether the default task function was set or not.

    @@ -739,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:312
  • +
  • Defined in src/worker/abstract-worker.ts:425
  • +
  • Defined in src/worker/abstract-worker.ts:436
  • +
  • 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:631
  • +
    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 +880,7 @@ then restore the original execution context.

  • checkStatistics
  • checkTaskFunctionName
  • checkTaskFunctions
  • -
  • checkValidTaskFunction
  • +
  • checkValidTaskFunctionEntry
  • checkWorkerOptions
  • emitDestroy
  • endTaskPerformance
  • @@ -877,71 +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