X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=c6b9b8d3869994a2ef44a7c5eff88f01dfce4bd2;hb=5ee29ca61ee790da371ad3a83fc7b9c79fb02de2;hp=6cc2dc1074c153dc7db1dd8ee5b69aa1bbe1d01b;hpb=665702eef3ad8153279b344e0276687f7f50c10f;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index 6cc2dc10..c6b9b8d3 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,4 +1,4 @@ -ThreadWorker | poolifier - v2.6.42
+ThreadWorker | poolifier - v2.7.0
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.42
+
  • The search index is not available
  • poolifier - v2.7.0
    @@ -47,7 +47,7 @@ but the minimum number of workers will be guaranteed.

    • ThreadWorker
    +
  • Defined in src/worker/thread-worker.ts:26
  • @@ -81,15 +81,16 @@ but the minimum number of workers will be guaranteed.

    handleError handleKillMessage handleReadyMessage +handleTaskFunctionOperationMessage hasTaskFunction -listTaskFunctions +listTaskFunctionNames messageListener removeTaskFunction run runAsync runInAsyncScope runSync -sendTaskFunctionsListToMainWorker +sendTaskFunctionNamesToMainWorker sendToMainWorker setDefaultTaskFunction triggerAsyncId @@ -128,7 +129,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/thread-worker.ts:40
  • Properties

    @@ -139,7 +140,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:74
  • isMain: boolean
    @@ -148,7 +149,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:86
  • lastTaskTimestamp: number
    @@ -157,7 +158,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:66
  • opts: WorkerOptions = DEFAULT_WORKER_OPTIONS
    @@ -166,7 +167,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:89
  • port: MessagePort
    @@ -174,7 +175,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/thread-worker.ts:33
  • statistics: WorkerStatistics
    @@ -183,7 +184,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:70
  • taskFunctions: Map<string, TaskFunction<Data, Response>>
    @@ -192,7 +193,7 @@ but the minimum number of workers will be guaranteed.

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

    @@ -206,13 +207,13 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/thread-worker.ts:84
  • Methods

      - +
    • Adds a task function to the worker. If a task function with the same name already exists, it is replaced.

      @@ -230,18 +231,12 @@ If a task function with the same name already exists, it is replaced.

      The task function to add.

    -

    Returns boolean

    Whether the task function was added or not.

    +

    Returns TaskFunctionOperationResult

    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.

    - -

    Throws

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

    -
    +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:307
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:284
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:303
  • +
  • Defined in src/worker/abstract-worker.ts:498
  • +
  • Defined in src/worker/thread-worker.ts:94
  • +
  • Defined in src/worker/thread-worker.ts:77
  • +
  • Defined in src/worker/thread-worker.ts:54
  • +
    + +
    -

    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
  • +
  • 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
  • +
  • Defined in src/worker/abstract-worker.ts:539
  • +
  • Defined in src/worker/abstract-worker.ts:600
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:295
  • -
    - +
  • Defined in src/worker/abstract-worker.ts:566
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:517
  • +
  • Defined in src/worker/thread-worker.ts:89
  • -

    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.

    +

    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 the default task function reserved name.

    - -

    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 node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:312
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:278