X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=20c167994831f58546e1c8f97e655fdec21469ff;hb=87f3b54969e17a64a69f3dc7ce4805493274a4f8;hp=1c910446e4d5bddd560bce69f3da8d72ff1a79fc;hpb=8d20e449d72975f6add9177d1097d5a204d14f71;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index 1c910446..20c16799 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -1,13 +1,13 @@ -DynamicThreadPool | poolifier
+DynamicThreadPool | poolifier - v3.0.2
-
+
  • The search index is not available
  • poolifier - v3.0.2 +
    @@ -30,12 +30,12 @@ When the maximum number of threads is reached and workers are busy, an event is
    • Data = unknown

      -

      Type of data sent to the worker. This can only be serializable data.

      +

      Type of data sent to the worker. This can only be structured-cloneable data.

    • Response = unknown

      -

      Type of execution response. This can only be serializable data.

      +

      Type of execution response. This can only be structured-cloneable data.

    @@ -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

    - +
    • @@ -133,7 +149,7 @@ When the maximum number of threads is reached and workers are busy, an event is
  • -
    opts: PoolOptions<ThreadWorkerWithMessageChannel> = {}
    +
    opts: ThreadPoolOptions = {}

    Options for this dynamic thread pool.

  • @@ -141,25 +157,29 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • 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:

      -
    • 'full': Emitted when the pool is dynamic and full.
    • -
    • 'busy': Emitted when the pool is busy.
    • +
    • '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 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:74
  • filePath: string
    @@ -168,15 +188,16 @@ 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

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

    +
  • Defined in src/pools/thread/dynamic.ts:30
  • numberOfWorkers: number
    @@ -185,20 +206,20 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:128
  • - -

    Options for the pool.

    + +

    Options for this fixed thread pool.

    +
  • Defined in src/pools/thread/fixed.ts:49
  • -
    promiseResponseMap: Map<string, PromiseResponseWrapper<ThreadWorkerWithMessageChannel, 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.
    • @@ -208,26 +229,25 @@ 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<ThreadWorkerWithMessageChannel, Data, Response>
    +
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>

    Worker choice strategy context referencing a worker choice algorithm implementation.

    -

    Default to a round robin algorithm.

    +
  • Defined in src/pools/abstract-pool.ts:94
  • - -
    workerNodes: WorkerNode<ThreadWorkerWithMessageChannel, Data>[] = []
    + +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

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

    @@ -242,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
  • +
  • Defined in src/pools/abstract-pool.ts:662
  • -
    +
  • Defined in src/pools/abstract-pool.ts:272
  • +
    -
    +
  • Defined in src/pools/abstract-pool.ts:485
  • +
  • Defined in src/pools/abstract-pool.ts:478
  • +
    + +
    +
  • Defined in src/pools/thread/dynamic.ts:39
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:150
  • Methods

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

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

      -

      Can be used to update the maxListeners or binding the main-worker<->worker connection if not bind by default.

      +

      Method hooked up after a worker node has been newly created. +Can be overridden.

      Parameters

      Returns void

    +
  • Defined in src/pools/abstract-pool.ts:1357
  • Returns void

    -
    - +
  • 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
  • +
    + +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:951
  • +
    +
    +
  • Defined in src/pools/thread/fixed.ts:60
  • +
  • Defined in src/pools/abstract-pool.ts:566
  • +
  • Defined in src/pools/abstract-pool.ts:881
  • +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:678
  • +
  • Defined in src/pools/thread/fixed.ts:55
  • +
    + +
    +
    + +

    Returns void

    Returns void

    +
  • Defined in src/pools/thread/fixed.ts:107
  • +
    + +
    +
    + +
    +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:78
  • +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:580
  • +
  • Defined in src/pools/abstract-pool.ts:533
  • +
  • Defined in src/pools/abstract-pool.ts:552
  • -
    - -
    +
    + +
    +
    + + +
    message: MessageValue<Response, unknown>
    +

    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