X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FClusterWorker.html;h=fa6c6898ff3b5d44a8d88c51d94cdcc04b4291e4;hb=cfc6e8df4c903b63514c46cb67b3f5e24079d3ce;hp=1dab878f6d4a4eff3b044b682f302be0fb72bf04;hpb=ed1ecf09c599769ed61771ec25d71c39c19ba70b;p=poolifier.git diff --git a/docs/classes/ClusterWorker.html b/docs/classes/ClusterWorker.html index 1dab878f..fa6c6898 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:22
  • @@ -110,13 +112,13 @@ but the minimum number of workers will be guaranteed.

    data: Data

    Returns Response

  • -
    opts: WorkerOptions = {}
    +
    opts: WorkerOptions = EMPTY_OBJECT_LITERAL

    Options for the worker.

  • Returns ClusterWorker<Data, Response>

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

    @@ -124,31 +126,33 @@ but the minimum number of workers will be guaranteed.

    aliveInterval?: Timeout

    Handler Id of the aliveInterval worker alive check.

    +
  • Defined in src/worker/abstract-worker.ts:31
  • 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:49
  • Options for the worker.

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

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

    Returns

    The unique asyncId assigned to the resource.

    Returns number

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

    Returns Func & { asyncResource: AsyncResource }

    +
  • Defined in node_modules/@types/node/async_hooks.d.ts:288
  • +
  • Defined in src/worker/abstract-worker.ts:144
  • +
  • Defined in node_modules/@types/node/async_hooks.d.ts:311
  • +
  • Defined in src/worker/abstract-worker.ts:127
  • Returns string

    +
  • Defined in src/worker/cluster-worker.ts:51
  • Returns Response

    Returns void

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

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

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

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

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

    Returns Func & { asyncResource: AsyncResource }

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