X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=ef98a6b01f3539c2466e032ea0c06cd674c81be4;hb=5aa31a743fde300612ae89a242b809ae7db083ed;hp=bd7cbabcbb4aeba6822b9c90262425cdc956602c;hpb=f33c2d55c063a50c0025bf707fa4faf7a5e25f6e;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index bd7cbabc..ef98a6b0 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,13 +1,13 @@ -ThreadWorker | poolifier - v2.6.12
+ThreadWorker | poolifier - v3.0.4
-
+
  • The search index is not available
  • poolifier - v3.0.4 +
    @@ -47,55 +47,59 @@ but the minimum number of workers will be guaranteed.

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

    Constructors

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

    -
    - -
    aliveInterval?: Timeout
    -

    Handler id of the aliveInterval worker alive check.

    +
    + +
    activeInterval?: Timeout
    +

    Handler id of the activeInterval worker activity check.

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

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

    -
    - -
    mainWorker: MessagePort
    -

    Reference to main worker.

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

    Message port used to communicate with the main worker.

    +
    +
    statistics: WorkerStatistics
    @@ -181,16 +184,16 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:75
  • -
    taskFunctions: Map<string, WorkerFunction<Data, Response>>
    +
    taskFunctions: Map<string, TaskFunction<Data, Response>>

    Task function(s) processed by the worker when the pool's execution function is invoked.

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

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

      @@ -224,22 +227,16 @@ If a task function with the same name already exists, it is replaced.

    • -
      fn: WorkerFunction<Data, Response>
      +
      fn: TaskFunction<Data, Response>

      The task function to add.

    -

    Returns boolean

    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.

    +

    Returns TaskFunctionOperationResult

    Whether the task function was added 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-typeerror If the fn parameter is not a function.

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

    +
  • Defined in node_modules/.pnpm/@types+node@20.8.7/node_modules/@types/node/async_hooks.d.ts:315
    • @@ -277,7 +274,7 @@ If a task function with the same name already exists, it is replaced.

    +
  • Defined in node_modules/.pnpm/@types+node@20.8.7/node_modules/@types/node/async_hooks.d.ts:288
  • +
  • Defined in node_modules/.pnpm/@types+node@20.8.7/node_modules/@types/node/async_hooks.d.ts:311
  • Returns MessagePort

    Reference to the main worker.

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

    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: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.8.7/node_modules/@types/node/async_hooks.d.ts:299
  • +
  • Defined in src/worker/abstract-worker.ts:521
  • +
    + +
    +
  • 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.8.7/node_modules/@types/node/async_hooks.d.ts:319
  • +
  • Defined in node_modules/.pnpm/@types+node@20.8.7/node_modules/@types/node/async_hooks.d.ts:278
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file