X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=b770b6855209a27a16264826872f68b9ebb0fe22;hb=c4d8442aed5e5a9d6cde9f3bfd721be3033c1eef;hp=ebc27124f04aec64ecbb500f7cea443aa54d979e;hpb=88499cf9c298c12aa8235e60d27657f50d3c38ee;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index ebc27124..b770b685 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,13 +1,13 @@ -ThreadWorker | poolifier - v2.6.17
+ThreadWorker | poolifier - v2.6.44
-
+
  • The search index is not available
  • poolifier - v2.6.44 +
    @@ -47,38 +47,40 @@ but the minimum number of workers will be guaranteed.

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

    Constructors

    -

    Properties

    -

    Accessors

    -
    id +

    Methods

    -
    addTaskFunction +
    addTaskFunction asyncId bind emitDestroy getMainWorker handleError +handleKillMessage +handleReadyMessage hasTaskFunction listTaskFunctions messageListener @@ -87,7 +89,7 @@ but the minimum number of workers will be guaranteed.

    runAsync runInAsyncScope runSync -sendReadyResponse +sendTaskFunctionsListToMainWorker sendToMainWorker setDefaultTaskFunction triggerAsyncId @@ -96,7 +98,7 @@ but the minimum number of workers will be guaranteed.

    Constructors

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

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

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

    +
  • Defined in src/worker/abstract-worker.ts:85
  • lastTaskTimestamp: number
    @@ -155,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
    @@ -182,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

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

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

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

    @@ -240,7 +241,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.9/node_modules/@types/node/async_hooks.d.ts:306
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.9/node_modules/@types/node/async_hooks.d.ts:283
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.9/node_modules/@types/node/async_hooks.d.ts:302
  • +
  • Defined in src/worker/abstract-worker.ts:434
  • +
  • Defined in src/worker/thread-worker.ts:96
  • +
    + +
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:177
  • +
  • Defined in src/worker/abstract-worker.ts:255
  • +
  • Defined in src/worker/abstract-worker.ts:329
  • +
  • Defined in src/worker/abstract-worker.ts:231
  • +
  • Defined in src/worker/abstract-worker.ts:476
  • +
  • Defined in src/worker/abstract-worker.ts:541
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.9/node_modules/@types/node/async_hooks.d.ts:294
  • -
    - +
  • Defined in src/worker/abstract-worker.ts:504
  • +
    +
    +
  • Defined in src/worker/abstract-worker.ts:453
  • +
  • Defined in src/worker/thread-worker.ts:91
  • +
  • Defined in src/worker/abstract-worker.ts:285
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.9/node_modules/@types/node/async_hooks.d.ts:311
  • +
  • Defined in node_modules/.pnpm/@types+node@20.5.9/node_modules/@types/node/async_hooks.d.ts:277
  • @@ -668,8 +711,8 @@ then restore the original execution context.

  • activeInterval
  • isMain
  • lastTaskTimestamp
  • -
  • mainWorker
  • opts
  • +
  • port
  • statistics
  • taskFunctions
  • id
  • @@ -679,6 +722,8 @@ then restore the original execution context.

  • emitDestroy
  • getMainWorker
  • handleError
  • +
  • handleKillMessage
  • +
  • handleReadyMessage
  • hasTaskFunction
  • listTaskFunctions
  • messageListener
  • @@ -687,73 +732,36 @@ then restore the original execution context.

  • runAsync
  • runInAsyncScope
  • runSync
  • -
  • sendReadyResponse
  • +
  • sendTaskFunctionsListToMainWorker
  • sendToMainWorker
  • setDefaultTaskFunction
  • triggerAsyncId
  • bind
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file