X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=c03d97602875426e0db043c5929bac798b9e384e;hb=c11be5eddc7229e4b77105ed27e93697b65d0146;hp=2106087924e92e7e5440423fec5ee4c39d85f8c9;hpb=2447ee8ce5d3db1253c7286482e5a54e84618ecf;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index 21060879..c03d9760 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -1,13 +1,13 @@ -DynamicThreadPool | poolifier - v2.6.24
+DynamicThreadPool | poolifier - v2.7.2
-
+
  • The search index is not available
  • poolifier - v2.7.2 +
    @@ -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:16
  • - +

    Constructors

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

    @@ -156,17 +165,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:73
  • filePath: string
    @@ -175,15 +186,16 @@ When the maximum number of threads is reached and workers are busy, an event is
    -
    +
  • Defined in src/pools/abstract-pool.ts:128
  • +
    max: number

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

    +
  • Defined in src/pools/thread/dynamic.ts:30
  • numberOfWorkers: number
    @@ -192,7 +204,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:127
  • @@ -201,11 +213,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.
    • @@ -215,7 +227,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:82
  • workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    @@ -224,16 +236,16 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:88
  • - +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

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

    @@ -248,7 +260,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:44
    • @@ -261,7 +273,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:645
    • @@ -273,19 +285,19 @@ When the maximum number of threads is reached and workers are busy, an event is
    -
    +
  • Defined in src/pools/abstract-pool.ts:265
  • +
    -
      +
      • get maxSize(): number
      • The pool maximum size.

        Returns number

    +
  • Defined in src/pools/abstract-pool.ts:478
    • @@ -297,7 +309,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:471
    • @@ -309,7 +321,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:423
    • @@ -322,7 +334,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:39
    • @@ -335,7 +347,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:440
    • @@ -347,9 +359,40 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/fixed.ts:149
  • Methods

    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:1026
  • +
  • Defined in src/pools/abstract-pool.ts:1337
  • -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:996
  • +
  • Defined in src/pools/abstract-pool.ts:1243
  • +
  • Defined in src/pools/abstract-pool.ts:1199
  • +
  • Defined in src/pools/thread/fixed.ts:136
  • +
    + +
      + +
    • +

      Deregisters a listener callback on the worker given its worker node key.

      +
      +
      +

      Type Parameters

      +
        +
      • +

        Message

      +
      +

      Parameters

      +
        +
      • +
        workerNodeKey: number
        +

        The worker node key.

        +
        +
      • +
      • +
        listener: ((message) => void)
        +

        The message listener callback.

        +
        +
        +
          +
        • +
            +
          • (message): void
          • +
          • +
            +

            Parameters

            +
            +

            Returns void

      +

      Returns void

      +
    +
  • Defined in src/pools/abstract-pool.ts:934
  • +
  • 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:559
  • +
  • Defined in src/pools/abstract-pool.ts:864
  • +
  • Defined in src/pools/abstract-pool.ts:1660
  • +
  • Defined in src/pools/abstract-pool.ts:1576
  • +
    + +
      + +
    • +

      Whether the specified task function exists in this pool.

      +
      +
      +

      Parameters

      +
        +
      • +
        name: string
        +

        The name of the task function.

        +
        +
      +

      Returns boolean

      true if the task function exists, false otherwise.

      + +
    +
    + +
      + +
    • 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:661
  • +
  • Defined in src/pools/thread/fixed.ts:55
  • +
    + +
    +
    + +
      + +
    • +

      Registers once a listener callback on the worker given its worker node key.

      +
      +
      +

      Type Parameters

      +
        +
      • +

        Message

      +
      +

      Parameters

      +
        +
      • +
        workerNodeKey: number
        +

        The worker node key.

        +
        +
      • +
      • +
        listener: ((message) => void)
        +

        The message listener callback.

        +
        +
        +
          +
        • +
            +
          • (message): void
          • +
          • +
            +

            Parameters

            +
            +

            Returns void

      +

      Returns void

      +
    +
  • Defined in src/pools/thread/fixed.ts:106
  • +
    + +
      + +
    • +

      Removes a task function from this pool.

      +
      +
      +

      Parameters

      +
        +
      • +
        name: string
        +

        The name of the task function.

        +
        +
      +

      Returns Promise<boolean>

      true if the task function was removed, false otherwise.

      + +
    +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:91
  • +
  • Defined in src/pools/thread/fixed.ts:77
  • +
    + +
      + +
    • +

      Sets the default task function in this pool.

      +
      +
      +

      Parameters

      +
        +
      • +
        name: string
        +

        The name of the task function.

        +
        +
      +

      Returns Promise<boolean>

      true if the default task function was set, false otherwise.

      + +
    +
  • Defined in src/pools/abstract-pool.ts:573
  • +
  • Defined in src/pools/abstract-pool.ts:526
  • +
  • Defined in src/pools/abstract-pool.ts:545
  • +
  • Defined in src/pools/abstract-pool.ts:980
  • +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:1488
  • @@ -845,7 +1077,7 @@ Can be overridden.

  • constructor
  • emitter
  • filePath
  • -
  • max
  • +
  • max
  • numberOfWorkers
  • opts
  • promiseResponseMap
  • @@ -854,97 +1086,69 @@ Can be overridden.

  • busy
  • full
  • info
  • -
  • maxSize
  • +
  • maxSize
  • minSize
  • ready
  • type
  • utilization
  • worker
  • +
  • addTaskFunction
  • afterTaskExecutionHook
  • afterWorkerNodeSetup
  • beforeTaskExecutionHook
  • -
  • checkDynamicPoolSize
  • createAndSetupDynamicWorkerNode
  • createAndSetupWorkerNode
  • createWorker
  • +
  • deregisterWorkerMessageListener
  • destroy
  • destroyWorkerNode
  • enableTasksQueue
  • execute
  • flushTasksQueue
  • getWorkerInfo
  • +
  • hasTaskFunction
  • +
  • hasWorkerNodeBackPressure
  • internalBusy
  • isMain
  • +
  • listTaskFunctionNames
  • +
  • registerOnceWorkerMessageListener
  • registerWorkerMessageListener
  • +
  • removeTaskFunction
  • +
  • sendKillMessageToWorker
  • sendStartupMessageToWorker
  • sendToWorker
  • +
  • setDefaultTaskFunction
  • setTasksQueueOptions
  • setWorkerChoiceStrategy
  • setWorkerChoiceStrategyOptions
  • setupHook
  • +
  • start
  • workerListener
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file