X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FThreadWorker.html;h=7d135a5d4c62b1ec643daa1745670febf4cb1ebd;hb=cc35cd9cb7323e39c9f521cdd4fbf51d1d31bbdf;hp=675fd4f114e860f81206eefce07dc878c0ef8b50;hpb=004a8816ae9b52388de246a9c7a5184a73915ad6;p=poolifier.git diff --git a/docs/classes/ThreadWorker.html b/docs/classes/ThreadWorker.html index 675fd4f1..7d135a5d 100644 --- a/docs/classes/ThreadWorker.html +++ b/docs/classes/ThreadWorker.html @@ -1,4 +1,4 @@ -ThreadWorker | poolifier
+ThreadWorker | poolifier - v2.6.40
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.40
    @@ -32,12 +32,12 @@ but the minimum number of workers will be guaranteed.

    • Data = unknown

      -

      Type of data this worker receives from pool's execution. This can only be serializable data.

      +

      Type of data this worker receives from pool's execution. This can only be structured-cloneable data.

    • Response = unknown

      -

      Type of response the worker sends back to the main thread. This can only be serializable data.

      +

      Type of response the worker sends back to the main thread. This can only be structured-cloneable data.

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

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

    Properties

    -
    +

    Accessors

    +
    id +
    +

    Methods

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

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

    -
    - -
    mainWorker: undefined | null | 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
    -

    Performance statistics computation.

    +
    statistics: WorkerStatistics
    +

    Performance statistics computation requirements.

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

    +
    + +

    Methods

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

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

    Message of the error.

    +
    +

    Parameters

    +
      +
    • +
      name: string
      +

      The name of the task function to check.

      +
    +

    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 or an empty string.

    +
    +
    + +
    +
  • Defined in src/worker/abstract-worker.ts:255
  • Returns void

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

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

    Generated using TypeDoc

    +

    Generated using TypeDoc

    \ No newline at end of file