X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FAbstractWorker.html;h=c3a79eecdf9d5a71e8b0258e53321f43a4f97bbf;hb=665702eef3ad8153279b344e0276687f7f50c10f;hp=3935360050b064b9ba25fe31db199584e59c3b6a;hpb=b7e141c40bccfd7a4ec0ff98b7829f7d296f048b;p=poolifier.git diff --git a/docs/classes/AbstractWorker.html b/docs/classes/AbstractWorker.html index 39353600..c3a79eec 100644 --- a/docs/classes/AbstractWorker.html +++ b/docs/classes/AbstractWorker.html @@ -1,13 +1,13 @@ -AbstractWorker | poolifier - v2.6.41
+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 @@ -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:193
  • Returns TaskPerformance

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

    Returns Func

    Since

    v14.8.0, v12.19.0

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

    Returns void

    +
  • 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:106
  • Returns void

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

    @@ -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: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

    @@ -677,15 +699,17 @@ then restore the original execution context.

  • fn: TaskSyncFunction<Data, Response>

    Task function that will be executed.

    -
  • +
    +
  • task: Task<Data>

    Input data for the task function.

    -
  • + +

    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.

    @@ -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:285
  • +
  • Defined in src/worker/abstract-worker.ts:398
  • +
  • Defined in src/worker/abstract-worker.ts:409
  • +
  • Defined in src/worker/abstract-worker.ts:606
  • +
    Optional thisArg: ThisArg

    Returns Func

    Since

    v14.8.0, v12.19.0

    @@ -819,15 +847,15 @@ then restore the original execution context.

    @@ -877,72 +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