X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=86a1da1457ef0298d91779856bf90cfcdc42184c;hb=660689f017615c233020793967822c31975e5aa0;hp=f56123db7a151afaf7b69bcbb7ae1bc0d46d5328;hpb=da7631f88ed580377ddba0882eac576bb32832eb;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index f56123db..86a1da14 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,13 +1,13 @@ -ThreadWorker | poolifier - v2.6.41
+ThreadWorker | poolifier - v2.6.45
-
+
  • The search index is not available
  • poolifier - v2.6.45 +
    @@ -47,19 +47,19 @@ but the minimum number of workers will be guaranteed.

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

    Constructors

    -

    Properties

    -
    activeInterval? +
    activeInterval? isMain lastTaskTimestamp opts @@ -69,11 +69,11 @@ but the minimum number of workers will be guaranteed.

    Accessors

    -
    id +

    Methods

    -
    addTaskFunction +
    addTaskFunction asyncId bind emitDestroy @@ -98,7 +98,7 @@ but the minimum number of workers will be guaranteed.

    Constructors

    - +
    • @@ -117,16 +117,18 @@ but the minimum number of workers will be guaranteed.

    • taskFunctions: TaskFunction<Data, Response> | TaskFunctions<Data, Response>

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

      -
    • +
    +
  • opts: WorkerOptions = {}

    Options for the worker.

    -
  • +
    +

    Returns ThreadWorker<Data, Response>

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

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

    +
  • Defined in src/worker/abstract-worker.ts:88
  • port: MessagePort
    @@ -172,7 +174,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/thread-worker.ts:33
  • statistics: WorkerStatistics
    @@ -181,7 +183,7 @@ but the minimum number of workers will be guaranteed.

    +
  • Defined in src/worker/abstract-worker.ts:69
  • taskFunctions: Map<string, TaskFunction<Data, Response>>
    @@ -190,7 +192,7 @@ but the minimum number of workers will be guaranteed.

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

    @@ -221,11 +223,13 @@ If a task function with the same name already exists, it is replaced.

  • name: string

    The name of the task function to add.

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

    The task function to add.

    -
  • + +

    Returns boolean

    Whether the task function was added or not.

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

    +
  • Defined in src/worker/abstract-worker.ts:220
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:307
  • + +

    Returns Func

    Since

    v14.8.0, v12.19.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:284
  • +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:303
  • +
  • Defined in src/worker/abstract-worker.ts:461
  • Returns string

    The error message.

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

    Returns void

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

    Returns void

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

    Returns boolean

    Whether the worker has a task function with the given name or not.

    @@ -385,7 +394,7 @@ never be called.

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

    Returns void

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

    Returns boolean

    Whether the task function existed and was removed or not.

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

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

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

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:567
  • 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.6.2/node_modules/@types/node/async_hooks.d.ts:295
  • + +

    Returns void

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

    Returns void

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

    Returns boolean

    Whether the default task function was set or not.

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

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

    Returns Func

    Since

    v14.8.0, v12.19.0

    +
  • Defined in node_modules/.pnpm/@types+node@20.6.2/node_modules/@types/node/async_hooks.d.ts:278
  • @@ -715,72 +738,30 @@ then restore the original execution context.

  • triggerAsyncId
  • bind
  • +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file