X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=a425fbf372a4d2c9a8a4beaaad647aa440c335c1;hb=8cc4ea811611b8ad77c7b0379911afe497f2e7e4;hp=284da061dc2bef6d7dce4bea255fb79ab045920d;hpb=79f98bd9040049eec047b50d2cbd0878fdc9e6f1;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index 284da061..a425fbf3 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,4 +1,4 @@ -ThreadWorker | poolifier - v2.6.15
+ThreadWorker | poolifier - v2.6.28
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.15
+
  • The search index is not available
  • poolifier - v2.6.28
    @@ -47,7 +47,7 @@ but the minimum number of workers will be guaranteed.

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

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

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

    Parameters

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

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

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

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

    -
    - -
    mainWorker: MessagePort
    -

    Reference to main worker.

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

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

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

    +
  • Defined in src/worker/thread-worker.ts:79
  • 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:195
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/async_hooks.d.ts:306
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/async_hooks.d.ts:283
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/async_hooks.d.ts:302
  • +
  • Defined in src/worker/abstract-worker.ts:424
  • +
  • Defined in src/worker/thread-worker.ts:89
  • +
    + +
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:174
  • +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:320
  • +
  • Defined in src/worker/abstract-worker.ts:238
  • +
  • Defined in src/worker/abstract-worker.ts:466
  • +
  • Defined in src/worker/abstract-worker.ts:518
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/async_hooks.d.ts:294
  • -
    - +
  • Defined in src/worker/abstract-worker.ts:481
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:443
  • +
  • Defined in src/worker/thread-worker.ts:84
  • +
  • Defined in src/worker/abstract-worker.ts:280
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/async_hooks.d.ts:311
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.0/node_modules/@types/node/async_hooks.d.ts:277