X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=857696e685f9b240467d9d780cee5d00be5e9514;hb=71d327d5587f0ce2b746ba33ec0cfbb3a0dc5d1b;hp=f413bcaa82576745c22786a76b3d76514df7fd4b;hpb=ff6cf64964e78aafa95098852ec0472b567f7b1b;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index f413bcaa..857696e6 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,13 +1,13 @@ -ThreadWorker | poolifier - v2.6.26
+ThreadWorker | poolifier - v2.7.4
-
+
  • The search index is not available
  • poolifier - v2.7.4 +
    @@ -47,19 +47,19 @@ but the minimum number of workers will be guaranteed.

    • ThreadWorker
    +
  • Defined in src/worker/thread-worker.ts:26
  • - +

    Constructors

    -

    Properties

    -
    activeInterval? +
    activeInterval? isMain lastTaskTimestamp opts @@ -69,11 +69,11 @@ but the minimum number of workers will be guaranteed.

    Accessors

    -
    id +

    Methods

    -
    addTaskFunction +
    addTaskFunction asyncId bind emitDestroy @@ -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 @@ -98,7 +99,7 @@ but the minimum number of workers will be guaranteed.

    Constructors

    - +
    +
  • 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:79
  • isMain: boolean
    @@ -148,7 +149,7 @@ but the minimum number of workers will be guaranteed.

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

    +
  • Defined in src/worker/abstract-worker.ts:71
  • - -
    opts: WorkerOptions = ...
    + +
    opts: WorkerOptions = DEFAULT_WORKER_OPTIONS

    Options for the worker.

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

    - -

    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.5/node_modules/@types/node/async_hooks.d.ts:315
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:288
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:311
  • +
  • Defined in src/worker/abstract-worker.ts:454
  • +
  • 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.

    -
    -
    - +
  • Defined in src/worker/abstract-worker.ts:162
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:243
  • +
  • Defined in src/worker/abstract-worker.ts:306
  • -

    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.

    +

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

    - -

    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:214
  • 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:494
  • +
  • Defined in src/worker/abstract-worker.ts:555
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:299
  • -
    - +
  • Defined in src/worker/abstract-worker.ts:521
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:473
  • +
  • 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.

    +

    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:270
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:319
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.5/node_modules/@types/node/async_hooks.d.ts:278
  • @@ -722,82 +717,45 @@ then restore the original execution context.

  • handleError
  • handleKillMessage
  • handleReadyMessage
  • +
  • handleTaskFunctionOperationMessage
  • hasTaskFunction
  • -
  • listTaskFunctions
  • +
  • listTaskFunctionNames
  • messageListener
  • removeTaskFunction
  • run
  • runAsync
  • runInAsyncScope
  • runSync
  • -
  • sendTaskFunctionsListToMainWorker
  • +
  • sendTaskFunctionNamesToMainWorker
  • sendToMainWorker
  • setDefaultTaskFunction
  • triggerAsyncId
  • bind
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file