X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicClusterPool.html;h=6ecf7c136e264fad16863ad40a623d58c4fec6d9;hb=95d287d1625c80929657a9f217774c5c8f6668e7;hp=1a5100b2992fd8c0b35fe6c4e0e6e65280eabf96;hpb=aac8863d208eadcb0ecb33dc44d045c26f5a444f;p=poolifier.git diff --git a/docs/classes/DynamicClusterPool.html b/docs/classes/DynamicClusterPool.html index 1a5100b2..e63d126d 100644 --- a/docs/classes/DynamicClusterPool.html +++ b/docs/classes/DynamicClusterPool.html @@ -1,4 +1,4 @@ -DynamicClusterPool | poolifier
+DynamicClusterPool | poolifier - v2.6.41
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.41
    @@ -30,12 +30,12 @@ When the maximum number of workers is reached and workers are busy, an event is
    • Data = unknown

      -

      Type of data sent to the worker. This can only be serializable data.

      +

      Type of data sent to the worker. This can only be structured-cloneable data.

    • Response = unknown

      -

      Type of execution response. This can only be serializable data.

      +

      Type of execution response. This can only be structured-cloneable data.

    @@ -45,7 +45,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    • DynamicClusterPool
    +
  • Defined in src/pools/cluster/dynamic.ts:15
  • @@ -59,7 +59,7 @@ When the maximum number of workers is reached and workers are busy, an event is

    Properties

    emitter? filePath -max +max numberOfWorkers opts promiseResponseMap @@ -71,26 +71,35 @@ When the maximum number of workers is reached and workers are busy, an event is

    Methods

  • max: number

    Maximum number of workers that can be created by this pool.

    -
    -
  • +
  • filePath: string

    Path to an implementation of a ClusterWorker file, which can be relative or absolute.

    -
    -
  • +
  • opts: ClusterPoolOptions = {}

    Options for this dynamic cluster pool.

    -
    -
  • +

    Returns DynamicClusterPool<Data, Response>

    +
  • Defined in src/pools/cluster/dynamic.ts:27
  • Properties

    @@ -150,16 +155,19 @@ When the maximum number of workers is reached and workers are busy, an event is

    Emitter on which events can be listened to.

    Events that can currently be listened to:

      -
    • 'full': Emitted when the pool is dynamic and full.
    • -
    • 'busy': Emitted when the pool is busy.
    • +
    • 'ready': Emitted when the number of workers created in the pool has reached the minimum size expected and are ready.
    • +
    • 'busy': Emitted when the number of workers created in the pool has reached the maximum size expected and are executing concurrently their tasks quota.
    • +
    • 'full': Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.
    • +
    • 'destroy': Emitted when the pool is destroyed.
    • 'error': Emitted when an uncaught error occurs.
    • 'taskError': Emitted when an error occurs while executing a task.
    • +
    • 'backPressure': Emitted when all worker nodes have back pressure (i.e. their tasks queue is full: queue size >= maximum queue size).
    +
  • Defined in src/pools/abstract-pool.ts:68
  • filePath: string
    @@ -168,15 +176,16 @@ When the maximum number of workers is reached and workers are busy, an event is
    -
    +
  • Defined in src/pools/abstract-pool.ts:117
  • +
    max: number

    Maximum number of workers that can be created by this pool.

    +
  • Defined in src/pools/cluster/dynamic.ts:29
  • numberOfWorkers: number
    @@ -185,7 +194,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:116
  • @@ -194,11 +203,11 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/cluster/fixed.ts:47
  • -
    promiseResponseMap: Map<string, PromiseResponseWrapper<Worker, Response>> = ...
    -

    The execution response promise map.

    +
    promiseResponseMap: Map<string, PromiseResponseWrapper<Response>> = ...
    +

    The task execution response promise map.

    • key: The message id of each submitted task.
    • value: An object that contains the worker, the execution response promise resolve and reject callbacks.
    • @@ -208,7 +217,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:78
  • workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    @@ -217,16 +226,16 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:84
  • - -
    workerNodes: WorkerNode<Worker, Data>[] = []
    + +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

    +
  • Defined in src/pools/abstract-pool.ts:65
  • Accessors

    @@ -241,7 +250,7 @@ When the maximum number of workers is reached and workers are busy, an event is
    +
  • Defined in src/pools/cluster/dynamic.ts:43
  • +
  • Defined in src/pools/abstract-pool.ts:689
  • -
    +
  • Defined in src/pools/abstract-pool.ts:350
  • +
    -
    +
  • Defined in src/pools/abstract-pool.ts:562
  • +
  • Defined in src/pools/abstract-pool.ts:555
  • +
    + +
    +
  • Defined in src/pools/cluster/dynamic.ts:38
  • +
    + +
    +
  • Defined in src/pools/cluster/fixed.ts:119
  • Methods

      - +
    • Hook executed after the worker task execution. Can be overridden.

      @@ -330,41 +364,38 @@ Can be overridden.

      Parameters

      • -
        worker: Worker
        -

        The worker.

        -
        -
      • +
        workerNodeKey: number
        +

        The worker node key.

        +
      • -
        message: MessageValue<Response, unknown, Worker | MessagePort>
        +
        message: MessageValue<Response, unknown>

        The received message.

        -
        -
      +

    Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:888
  • +
    +
      - +
    • -

      Function that can be hooked up when a worker has been newly created and moved to the pool worker nodes.

      -

      Can be used to update the maxListeners or binding the main-worker<->worker connection if not bind by default.

      +

      Method hooked up after a worker node has been newly created. +Can be overridden.

      Parameters

      • -
        worker: Worker
        -

        The newly created worker.

        -
        -
      +
      workerNodeKey: number
      +

      The newly created worker node key.

      +

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:1162
  • +

    Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:858
  • +
    +
    +
    + +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:1105
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:1061
  • +
  • Defined in src/pools/cluster/fixed.ts:109
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:803
  • +
    + +

    Returns Promise<void>

    +
  • Defined in src/pools/cluster/fixed.ts:63
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:643
  • Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    +
  • Defined in src/pools/abstract-pool.ts:747
  • +
    + +
    +
    + +
    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:705
  • +
  • Defined in src/pools/cluster/fixed.ts:58
  • +
    + +

    Returns void

    Returns void

    +
  • Defined in src/pools/cluster/fixed.ts:101
  • +
    + +
    +
    + +

    Returns void

    +
  • Defined in src/pools/cluster/fixed.ts:85
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:655
  • +Optional

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:610
  • +

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:629
  • +
  • Defined in src/pools/cluster/fixed.ts:53
  • +
  • Defined in src/pools/abstract-pool.ts:1331
  • +
  • WorkerTypes
  • +
  • availableParallelism
  • -

    Generated using TypeDoc

    +

    Generated using TypeDoc

    \ No newline at end of file