X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=20c167994831f58546e1c8f97e655fdec21469ff;hb=87f3b54969e17a64a69f3dc7ce4805493274a4f8;hp=ad0632c4ab6cb95e036940eebfd90db161e77d22;hpb=233339f4de21ce5e584d37e18121d676cd3af0bd;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index ad0632c4..20c16799 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -1,13 +1,13 @@ -DynamicThreadPool | poolifier - v2.6.30
+DynamicThreadPool | poolifier - v3.0.2
-
+
  • The search index is not available
  • poolifier - v3.0.2 +
    @@ -45,19 +45,19 @@ 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

    - -
    emitter?: PoolEmitter
    -

    Emitter on which events can be listened to.

    + +
    emitter?: EventEmitterAsyncResource
    +

    Event emitter integrated with async resource on which events can be listened to. +The async tracking tooling identifier is poolifier:<PoolType>-<WorkerType>-pool.

    Events that can currently be listened to:

    • '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.
    • +
    • '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).
    • +
    • '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:74
  • filePath: string
    @@ -180,7 +188,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:129
  • max: number
    @@ -189,7 +197,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:30
  • numberOfWorkers: number
    @@ -198,7 +206,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:128
  • @@ -207,11 +215,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.
    • @@ -221,7 +229,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:88
  • workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    @@ -230,7 +238,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:94
  • workerNodes: IWorkerNode<Worker, Data>[] = []
    @@ -239,7 +247,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:71
  • Accessors

    @@ -254,7 +262,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:44
    • @@ -267,7 +275,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:662
    • @@ -279,7 +287,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:272
    • @@ -291,7 +299,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:485
    • @@ -303,7 +311,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:478
    • @@ -315,7 +323,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:430
    • @@ -328,7 +336,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:39
    • @@ -341,7 +349,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:447
    • @@ -353,9 +361,40 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/fixed.ts:150
  • Methods

    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:1044
  • +
  • Defined in src/pools/abstract-pool.ts:1357
  • -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:1014
  • +
  • Defined in src/pools/abstract-pool.ts:1261
  • +
  • Defined in src/pools/abstract-pool.ts:1217
  • +
  • Defined in src/pools/thread/fixed.ts:137
  • +
    + +
      + +
    • +

      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:951
  • +
  • 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:566
  • +
  • Defined in src/pools/abstract-pool.ts:881
  • +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:1693
  • +
  • Defined in src/pools/abstract-pool.ts:1605
  • +
    + +
      + +
    • +

      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.

      + +
    +
  • Defined in src/pools/abstract-pool.ts:1651
  • +
  • Defined in src/pools/abstract-pool.ts:678
  • -
    - +
  • 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:117
  • +
  • Defined in src/pools/thread/fixed.ts:107
  • +
    + +
      + +
    • +

      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.

      + +
      - +
    • Parameters

      • -
        workerNodeKey: number
      • -
      • -
        workerId: number
      +
      workerNodeKey: number

    Returns Promise<void>

    +
  • Defined in src/pools/abstract-pool.ts:962
  • +
  • Defined in src/pools/thread/fixed.ts:92
  • +
  • Defined in src/pools/thread/fixed.ts:78
  • +
    + +
      + +
    • +

      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:580
  • +
  • Defined in src/pools/abstract-pool.ts:533
  • +
  • Defined in src/pools/abstract-pool.ts:552
  • -
    - -
    +
    + +
      +
    • -

      This method is the listener registered for each worker message.

      +

      Starts the minimum number of workers in this pool.

      -

      Returns ((message) => void)

      The listener function to execute when a message is received from a worker.

      - -
    +
    + +
      +
    • -

      This method is the listener registered for each worker message.

      +

      This method is the message listener registered on each worker.

      Parameters

      -

      Returns void

      The listener function to execute when a message is received from a worker.

      - -
    +

    Returns void

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

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file