X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=ec7c0cc1d3044903e144e30fa8627de713b74c22;hb=999ef664722a6ef639e3b3a90542e3ed2f38288c;hp=f1bad270bcf4a51669e79620a5430550c9b48d9d;hpb=67e8ef11907ab8ae70740d7c9f4d5d225ed8d522;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index f1bad270..ec7c0cc1 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -1,4 +1,4 @@ -DynamicThreadPool | poolifier - v2.6.12
+DynamicThreadPool | poolifier - v2.6.36
  • Preparing search index...
  • -
  • The search index is not available
poolifier - v2.6.12
+
  • The search index is not available
  • poolifier - v2.6.36
    @@ -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,10 +71,9 @@ When the maximum number of threads is reached and workers are busy, an event is
    busy full info -maxSize +maxSize minSize ready -starting type utilization worker @@ -82,18 +81,25 @@ When the maximum number of threads is reached and workers are busy, an event is

    Methods

  • max: number

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

    -
    -
  • +
  • filePath: string

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

    -
    -
  • +
  • opts: ThreadPoolOptions = {}

    Options for this dynamic thread pool.

    -
    -
  • +

    Returns DynamicThreadPool<Data, Response>

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

    @@ -153,17 +155,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 >= maximum queue size).
    +
  • Defined in src/pools/abstract-pool.ts:67
  • filePath: string
    @@ -172,15 +176,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
    @@ -189,7 +194,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:115
  • @@ -198,11 +203,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<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.
    • @@ -212,7 +217,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>
    @@ -221,16 +226,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:64
  • Accessors

    @@ -245,7 +250,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/thread/dynamic.ts:43
  • +
  • Defined in src/pools/abstract-pool.ts:688
  • -
    +
  • Defined in src/pools/abstract-pool.ts:349
  • +
    -
    +
  • Defined in src/pools/abstract-pool.ts:561
  • +
  • Defined in src/pools/abstract-pool.ts:554
  • -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:506
  • +
  • Defined in src/pools/thread/dynamic.ts:38
  • +
  • Defined in src/pools/abstract-pool.ts:523
  • +
  • Defined in src/pools/thread/fixed.ts:127
  • Methods

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

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

      Parameters

      • -
        worker: Worker
        -

        The worker.

        -
        -
      • +
        workerNodeKey: number
        +

        The worker node key.

        +
      • message: MessageValue<Response, unknown>

        The received message.

        -
        -
      +

    Returns void

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

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

      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:1155
  • +

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:851
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:186
  • +
    +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:1098
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:1054
  • +
  • Defined in src/pools/thread/fixed.ts:114
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:796
  • +
    +

    Returns Promise<void>

    +
  • Defined in src/pools/thread/fixed.ts:60
  • Returns void

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

    Promise that will be fulfilled when the task is completed.

    +
  • Defined in src/pools/abstract-pool.ts:738
  • +
    + +
    +
    + +
    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:704
  • +
  • Defined in src/pools/thread/fixed.ts:55
  • +
    + +
    +
    + +
    +
    + +
    +
    + +

    Returns void

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

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

    Returns void

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

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:628
  • +
  • Defined in src/pools/abstract-pool.ts:835
  • +
  • Defined in src/pools/abstract-pool.ts:1335
  • -

    Generated using TypeDoc

    +

    Generated using TypeDoc

    \ No newline at end of file