X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=4320b8d49383dddc7307007b8dd0241e7f1e5c28;hb=3eed67feea0f527e3ee31a6ebb1063883eec3855;hp=8d55fceda26d6ca3b4f4271a2f5e42d7240005b7;hpb=0e16e60a89029abe61cda7ba293c036298cced05;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index 8d55fced..4320b8d4 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -1,13 +1,13 @@ -DynamicThreadPool | poolifier - v2.6.26
+DynamicThreadPool | poolifier - v2.6.45
-
+
  • The search index is not available
  • poolifier - v2.6.45 +
    @@ -45,21 +45,21 @@ When the maximum number of threads is reached and workers are busy, an event is
    • DynamicThreadPool
    +
  • Defined in src/pools/thread/dynamic.ts:15
  • - +

    Constructors

    -

    Properties

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

    Accessors

    -
    busy +
    busy full info -maxSize +maxSize minSize ready type @@ -80,7 +80,7 @@ When the maximum number of threads is reached and workers are busy, an event is

    Methods

    -
    afterTaskExecutionHook +
    afterTaskExecutionHook afterWorkerNodeSetup beforeTaskExecutionHook checkDynamicPoolSize @@ -93,6 +93,7 @@ When the maximum number of threads is reached and workers are busy, an event is execute flushTasksQueue getWorkerInfo +hasWorkerNodeBackPressure internalBusy isMain listTaskFunctions @@ -104,12 +105,13 @@ When the maximum number of threads is reached and workers are busy, an event is setWorkerChoiceStrategy setWorkerChoiceStrategyOptions setupHook +start workerListener

    Constructors

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

    @@ -158,17 +160,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.
    • +
    • '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
    @@ -177,15 +181,16 @@ When the maximum number of threads is reached and workers are busy, an event is
    -
    +
  • Defined in src/pools/abstract-pool.ts:116
  • +
    max: number

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

    +
  • Defined in src/pools/thread/dynamic.ts:29
  • numberOfWorkers: number
    @@ -194,7 +199,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:115
  • @@ -203,11 +208,11 @@ 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>> = ...
    -

    The task execution response promise map.

    +

    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.
    • @@ -217,7 +222,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:77
  • workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    @@ -226,16 +231,16 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:83
  • - +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

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

    @@ -250,7 +255,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:43
    • @@ -263,7 +268,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:722
    • @@ -275,19 +280,19 @@ When the maximum number of threads is reached and workers are busy, an event is
    -
    +
  • Defined in src/pools/abstract-pool.ts:342
  • +
    -
      +
      • get maxSize(): number
      • The pool maximum size.

        Returns number

    +
  • Defined in src/pools/abstract-pool.ts:555
    • @@ -299,7 +304,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:548
    • @@ -311,7 +316,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:500
    • @@ -324,7 +329,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:38
    • @@ -337,7 +342,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:517
    • @@ -349,7 +354,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/fixed.ts:130
  • Methods

    @@ -377,7 +382,7 @@ Can be overridden.

    +
  • Defined in src/pools/abstract-pool.ts:935
  • +
  • Defined in src/pools/abstract-pool.ts:1209
  • +
  • Defined in src/pools/abstract-pool.ts:905
  • +
  • Defined in src/pools/abstract-pool.ts:187
  • +
  • Defined in src/pools/abstract-pool.ts:1152
  • +
  • Defined in src/pools/abstract-pool.ts:1108
  • +
  • Defined in src/pools/thread/fixed.ts:117
  • +
  • Defined in src/pools/abstract-pool.ts:850
  • +
  • Defined in src/pools/thread/fixed.ts:60
    • -

      Enables/disables the worker tasks queue in this pool.

      +

      Enables/disables the worker node tasks queue in this pool.

      Parameters

      • enable: boolean
        -

        Whether to enable or disable the worker tasks queue.

        +

        Whether to enable or disable the worker node tasks queue.

      • Optional tasksQueueOptions: TasksQueueOptions
        -

        The worker tasks queue options.

        +

        The worker node tasks queue options.

      Returns void

    +
  • Defined in src/pools/abstract-pool.ts:636
  • +
  • Defined in src/pools/abstract-pool.ts:779
  • +
  • Defined in src/pools/abstract-pool.ts:1542
  • +
  • Defined in src/pools/abstract-pool.ts:1458
  • +
    + +
      + +
    • 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.

      + +
    +
  • Defined in src/pools/abstract-pool.ts:738
  • +
  • Defined in src/pools/thread/fixed.ts:55
  • +
  • Defined in src/pools/abstract-pool.ts:758
  • +
  • Defined in src/pools/thread/fixed.ts:107
  • +
  • Defined in src/pools/abstract-pool.ts:860
  • +
  • Defined in src/pools/thread/fixed.ts:91
  • +
  • Defined in src/pools/thread/fixed.ts:80
  • +
  • Defined in src/pools/abstract-pool.ts:650
  • +
  • Defined in src/pools/abstract-pool.ts:603
  • +
  • Defined in src/pools/abstract-pool.ts:622
  • +
  • Defined in src/pools/abstract-pool.ts:889
  • +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:1372
  • @@ -876,7 +914,7 @@ Can be overridden.

  • constructor
  • emitter
  • filePath
  • -
  • max
  • +
  • max
  • numberOfWorkers
  • opts
  • promiseResponseMap
  • @@ -885,7 +923,7 @@ Can be overridden.

  • busy
  • full
  • info
  • -
  • maxSize
  • +
  • maxSize
  • minSize
  • ready
  • type
  • @@ -904,6 +942,7 @@ Can be overridden.

  • execute
  • flushTasksQueue
  • getWorkerInfo
  • +
  • hasWorkerNodeBackPressure
  • internalBusy
  • isMain
  • listTaskFunctions
  • @@ -915,70 +954,33 @@ Can be overridden.

  • setWorkerChoiceStrategy
  • setWorkerChoiceStrategyOptions
  • setupHook
  • +
  • start
  • workerListener
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file