X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FClusterWorker.html;h=6d54c5577ed563b7a609d395f31537c419366d06;hb=40baeb4e66efa6646d3221029cd012fb7bda8955;hp=53205cf2f2fa5a077b31a8ab8553edb4b2600af5;hpb=e83f3916315e18f3ca0c614d6ec9e064ab76c13c;p=poolifier.git diff --git a/docs/classes/ClusterWorker.html b/docs/classes/ClusterWorker.html index 53205cf2..6d54c557 100644 --- a/docs/classes/ClusterWorker.html +++ b/docs/classes/ClusterWorker.html @@ -1,11 +1,13 @@ ClusterWorker | poolifier
-
+
@@ -20,10 +22,6 @@ it will send a termination request to its main worker.

If you use a DynamicClusterPool the extra workers that were created will be terminated, but the minimum number of workers will be guaranteed.

-

Template

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

- -

Template

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

-

Author

Christopher Quadflieg

Since

2.0.0

@@ -32,17 +30,21 @@ but the minimum number of workers will be guaranteed.

Type Parameters

  • -

    Data = unknown

  • +

    Data = unknown

    +

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

    +
  • -

    Response = unknown

+

Response = unknown

+

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

+

Hierarchy

    -
  • AbstractWorker<Worker, Data, Response> +
  • AbstractWorker<Worker, Data, Response>
    • ClusterWorker
+
  • Defined in src/worker/cluster-worker.ts:21
  • @@ -55,9 +57,10 @@ but the minimum number of workers will be guaranteed.

    Properties

    Methods

    @@ -114,41 +117,51 @@ but the minimum number of workers will be guaranteed.

    Options for the worker.

    Returns ClusterWorker<Data, Response>

    +
  • Defined in src/worker/cluster-worker.ts:31
  • Properties

    aliveInterval?: Timeout
    -

    Handler Id of the aliveInterval worker alive check.

    +

    Handler id of the aliveInterval worker alive check.

    +
  • Defined in src/worker/abstract-worker.ts:31
  • +
    + +
    isMain: boolean
    +

    Whether this is the main worker or not.

    +
    lastTaskTimestamp: number

    Timestamp of the last task processed by this worker.

    +
  • Defined in src/worker/abstract-worker.ts:27
  • -
    mainWorker: undefined | null | Worker
    -
    - - +
  • Defined in src/worker/abstract-worker.ts:45
  • +
    + +
    opts: WorkerOptions = ...

    Options for the worker.

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

    @@ -160,13 +173,13 @@ but the minimum number of workers will be guaranteed.

    Returns

    The unique asyncId assigned to the resource.

    Returns number

    +
  • Defined in node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts:315
  • -

    Returns Func & { asyncResource: AsyncResource }

    +
  • Defined in src/worker/abstract-worker.ts:146
  • +
  • Defined in node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts:311
  • +
  • Defined in src/worker/abstract-worker.ts:129
  • Returns string

    +
  • Defined in src/worker/cluster-worker.ts:47
  • Returns void

    +
  • Defined in src/worker/abstract-worker.ts:84
  • Returns Response

  • -
    value: MessageValue<Data, unknown>
    +
    message: MessageValue<Data, unknown>

    Input data for the given function.

  • Returns void

    +
  • Defined in src/worker/abstract-worker.ts:171
  • Returns Promise<Response>

  • -
    value: MessageValue<Data, unknown>
    +
    message: MessageValue<Data, unknown>

    Input data for the given function.

  • Returns void

    +
  • Defined in src/worker/abstract-worker.ts:198
  • Returns Result

    +
  • Defined in node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts:303
  • Returns void

    +
  • Defined in src/worker/cluster-worker.ts:42
  • +
  • Defined in node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts:320
  • -

    Returns Func & { asyncResource: AsyncResource }

    +
  • Defined in node_modules/.pnpm/@types+node@18.15.11/node_modules/@types/node/async_hooks.d.ts:273