X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=2fcb0676ff5da98ccf5efbd2b54726b884d54492;hb=adab53c70d781f8c26e35b7359efa3d05c278fa8;hp=bd7cbabcbb4aeba6822b9c90262425cdc956602c;hpb=a15339d10554e3130fa1d8957163cb29a8eb2c41;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index bd7cbabc..2fcb0676 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,4 +1,4 @@ -ThreadWorker | poolifier - v2.6.12
+ThreadWorker | poolifier - v2.6.39
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.12
+
  • The search index is not available
  • poolifier - v2.6.39
    @@ -47,7 +47,7 @@ but the minimum number of workers will be guaranteed.

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

    Properties

    -
    @@ -79,17 +79,20 @@ but the minimum number of workers will be guaranteed.

    emitDestroy getMainWorker handleError +handleKillMessage +handleReadyMessage hasTaskFunction +listTaskFunctions messageListener removeTaskFunction run runAsync runInAsyncScope runSync +sendTaskFunctionsListToMainWorker sendToMainWorker setDefaultTaskFunction triggerAsyncId -workerReady bind
    @@ -112,31 +115,29 @@ but the minimum number of workers will be guaranteed.

    Parameters

    +

    Returns ThreadWorker<Data, Response>

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

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

    -
    - -
    mainWorker: MessagePort
    -

    Reference to main worker.

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

    Options for the worker.

    +
  • Defined in src/worker/abstract-worker.ts:88
  • +
    + +
    port: MessagePort
    +

    Message port used to communicate with the main worker.

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

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

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

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

    @@ -221,17 +221,15 @@ If a task function with the same name already exists, it is replaced.

  • name: string

    The name of the task function to add.

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

    +

    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.

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

    +
  • Defined in src/worker/abstract-worker.ts:193
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.7/node_modules/@types/node/async_hooks.d.ts:306
  • +

    Returns Func

    Since

    v14.8.0, v12.19.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.7/node_modules/@types/node/async_hooks.d.ts:283
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.7/node_modules/@types/node/async_hooks.d.ts:302
  • +
  • Defined in src/worker/abstract-worker.ts:434
  • +

    Returns string

    The error message.

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

    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.

    +

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

    Returns void

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

    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.

    +

    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.

    @@ -397,7 +443,7 @@ never be called.

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

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.7/node_modules/@types/node/async_hooks.d.ts:294
  • +

    Returns void

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

    Returns void

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

    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.

    +

    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.

    @@ -571,7 +619,7 @@ then restore the original execution context.

    +
  • Defined in src/worker/abstract-worker.ts:285
  • -
    - -
    +
  • Defined in node_modules/.pnpm/@types+node@20.5.7/node_modules/@types/node/async_hooks.d.ts:311
  • +
    Optional thisArg: ThisArg
    Optional

    Returns Func

    Since

    v14.8.0, v12.19.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.5.7/node_modules/@types/node/async_hooks.d.ts:277
  • -

    Generated using TypeDoc

    +

    Generated using TypeDoc

    \ No newline at end of file