X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=ad0632c4ab6cb95e036940eebfd90db161e77d22;hb=fa5bdff51f129cada6116f34289dfe5a16bb4c9e;hp=4332af1394df411673cc8860c5bcfe4a1f85ca3f;hpb=3c7c9bd12cf4b0cec0e0a3825c31f7cc9f3f58fe;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index 4332af13..ad0632c4 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -1,4 +1,4 @@ -DynamicThreadPool | poolifier - v2.6.21
+DynamicThreadPool | poolifier - v2.6.30
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.21
+
  • The search index is not available
  • poolifier - v2.6.30
    @@ -45,7 +45,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    • DynamicThreadPool
    +
  • Defined in src/pools/thread/dynamic.ts:15
  • @@ -59,7 +59,7 @@ When the maximum number of threads is reached and workers are busy, an event is

    Properties

    emitter? filePath -max +max numberOfWorkers opts promiseResponseMap @@ -71,7 +71,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    busy full info -maxSize +maxSize minSize ready type @@ -93,9 +93,12 @@ When the maximum number of threads is reached and workers are busy, an event is execute flushTasksQueue getWorkerInfo +hasWorkerNodeBackPressure internalBusy isMain +listTaskFunctions registerWorkerMessageListener +sendKillMessageToWorker sendStartupMessageToWorker sendToWorker setTasksQueueOptions @@ -147,7 +150,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:27
  • Properties

    @@ -156,17 +159,19 @@ When the maximum number of threads 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 the number of workers created has reached the maximum size expected.
    • '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 at least one task.
    • +
    • '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 >= pool maximum size^2).
    +
  • Defined in src/pools/abstract-pool.ts:65
  • filePath: string
    @@ -175,15 +180,16 @@ When the maximum number of threads is reached and workers are busy, an event is
    -
    +
  • Defined in src/pools/abstract-pool.ts:110
  • +
    max: number

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

    +
  • Defined in src/pools/thread/dynamic.ts:29
  • numberOfWorkers: number
    @@ -192,7 +198,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:109
  • @@ -201,7 +207,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/fixed.ts:49
  • promiseResponseMap: Map<string, PromiseResponseWrapper<Response>> = ...
    @@ -215,7 +221,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:75
  • workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    @@ -224,16 +230,16 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:81
  • - +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

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

    @@ -248,7 +254,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:43
    • @@ -261,7 +267,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:641
    • @@ -273,19 +279,19 @@ When the maximum number of threads is reached and workers are busy, an event is
    -
    +
  • Defined in src/pools/abstract-pool.ts:324
  • +
    -
      +
      • get maxSize(): number
      • The pool maximum size.

        Returns number

    +
  • Defined in src/pools/abstract-pool.ts:525
    • @@ -297,7 +303,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:518
    • @@ -309,7 +315,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:470
    • @@ -322,7 +328,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:38
    • @@ -335,7 +341,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:487
    • @@ -347,7 +353,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/fixed.ts:127
  • Methods

    @@ -375,7 +381,7 @@ Can be overridden.

    +
  • Defined in src/pools/abstract-pool.ts:827
  • +
  • Defined in src/pools/abstract-pool.ts:1091
  • +
  • Defined in src/pools/abstract-pool.ts:804
  • +
  • Defined in src/pools/abstract-pool.ts:179
  • +
  • Defined in src/pools/abstract-pool.ts:1037
  • +
  • Defined in src/pools/abstract-pool.ts:997
  • +
  • Defined in src/pools/thread/fixed.ts:114
  • +
  • Defined in src/pools/abstract-pool.ts:750
  • +
  • Defined in src/pools/thread/fixed.ts:60
  • +
  • Defined in src/pools/abstract-pool.ts:606
    • - +
    • Executes the specified function in the worker constructor with the task data input parameter.

      @@ -547,12 +553,17 @@ Can be overridden.

      • Optional data: Data
        -

        The task input data for the specified task function. This can only be structured-cloneable data.

        +

        The optional task input data for the specified task function. This can only be structured-cloneable data.

      • Optional name: string
        -

        The name of the task function to execute. If not specified, the default task function will be executed.

        +

        The optional name of the task function to execute. If not specified, the default task function will be executed.

        +
        +
      • +
      • +
        Optional transferList: TransferListItem[]
        +

        An optional array of transferable objects to transfer ownership of. Ownership of the transferred objects is given to the pool's worker_threads worker and they should not be used in the main thread afterwards.

    Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    @@ -560,7 +571,7 @@ Can be overridden.

    +
  • Defined in src/pools/abstract-pool.ts:691
  • +
  • Defined in src/pools/abstract-pool.ts:1345
  • +
  • Defined in src/pools/abstract-pool.ts:1260
  • +
    + +
      + +
    • Internal +

      Whether the worker node has back pressure (i.e. its tasks queue is full).

      +
      +
      +

      Parameters

      +
        +
      • +
        workerNodeKey: number
        +

        The worker node key.

        +
        +
      +

      Returns boolean

      true if the worker node has back pressure, false otherwise.

      + +
    • -

      Whether worker nodes are executing at least one task.

      +

      Whether worker nodes are executing concurrently their tasks quota or not.

      Returns boolean

      Worker nodes busyness boolean status.

    +
  • Defined in src/pools/abstract-pool.ts:657
  • +
  • Defined in src/pools/thread/fixed.ts:55
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:104
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:88
    • - +
    • Sends a message to worker given its worker node key.

      @@ -701,12 +762,17 @@ Can be overridden.

      message: MessageValue<Data, unknown>

      The message.

      +
    • +
    • +
      Optional transferList: TransferListItem[]
      +

      The optional array of transferable objects.

      +

    Returns void

    +
  • Defined in src/pools/thread/fixed.ts:77
  • +
  • Defined in src/pools/abstract-pool.ts:618
  • +
  • Defined in src/pools/abstract-pool.ts:573
  • +
  • Defined in src/pools/abstract-pool.ts:592
  • +
  • Defined in src/pools/abstract-pool.ts:788
  • +
  • Defined in src/pools/abstract-pool.ts:1174