X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=1c2345435339a40ce1d0d111e2ef01df67fa5ae0;hb=dc021bcca72f8b4d185d96a301579612fba2793b;hp=a4a6dc6800c4fbf07d357661e600648eec1f8b19;hpb=7e0388f2750ecb9d6ecce5173066774a8ad1cc7b;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index a4a6dc68..1c234543 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,4 +1,4 @@ -ThreadWorker | poolifier - v2.6.13
+ThreadWorker | poolifier - v2.6.34
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.13
+
  • The search index is not available
  • poolifier - v2.6.34
    @@ -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,7 +115,7 @@ but the minimum number of workers will be guaranteed.

    Parameters

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

    +
  • Defined in src/worker/abstract-worker.ts:85
  • lastTaskTimestamp: number
    @@ -154,25 +157,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 +183,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 +206,7 @@ but the minimum number of workers will be guaranteed.

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

    @@ -224,14 +226,14 @@ 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.

    +

    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 +241,7 @@ If a task function with the same name already exists, it is replaced.

    +
  • Defined in src/worker/abstract-worker.ts:183
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.4/node_modules/@types/node/async_hooks.d.ts:306
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.4/node_modules/@types/node/async_hooks.d.ts:283
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.4/node_modules/@types/node/async_hooks.d.ts:302
  • +
  • Defined in src/worker/abstract-worker.ts:423
  • +
  • Defined in src/worker/thread-worker.ts:96
  • +
    + +
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:167
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:319
  • +
  • Defined in src/worker/abstract-worker.ts:221
  • +
  • Defined in src/worker/abstract-worker.ts:465
  • +
  • Defined in src/worker/abstract-worker.ts:517
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.4/node_modules/@types/node/async_hooks.d.ts:294
  • +
  • Defined in src/worker/abstract-worker.ts:480
  • +
    + +
    +
  • Defined in src/worker/thread-worker.ts:91
  • +
  • Defined in src/worker/abstract-worker.ts:275
  • -
    - -
    +
  • Defined in node_modules/.pnpm/@types+node@20.5.4/node_modules/@types/node/async_hooks.d.ts:311
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.4/node_modules/@types/node/async_hooks.d.ts:277