X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=25b842f78dd68afa2c33807fd36910b47c936a03;hb=1b0aa06b3ab5cf8ae8bd135087143165889901cc;hp=bda91d6193575e4dc0aba89bdeb01f3a2c07d49e;hpb=0770fe626b2bb3212a1d73fa4764973ac92e241a;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index bda91d61..25b842f7 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -18,7 +18,7 @@

A thread pool with a dynamic number of threads, but a guaranteed minimum number of threads.

This thread pool creates new threads when the others are busy, up to the maximum number of threads. -When the maximum number of threads is reached, an event is emitted. If you want to listen to this event, use the pool's emitter.

+When the maximum number of threads is reached and workers are busy, an event is emitted. If you want to listen to this event, use the pool's emitter.

Author

Alessandro Pio Ardizio

@@ -42,7 +42,7 @@ When the maximum number of threads is reached, an event is emitted. If you want
+
  • Defined in src/pools/thread/dynamic.ts:17
  • @@ -56,17 +56,18 @@ When the maximum number of threads is reached, an event is emitted. If you want

    Properties

    Accessors

    @@ -75,20 +76,25 @@ When the maximum number of threads is reached, an event is emitted. If you want
    afterPromiseResponseHook afterWorkerSetup beforePromiseResponseHook -chooseWorker +chooseWorkerNode createAndSetupWorker createWorker +dequeueTask destroy destroyWorker +enqueueTask execute -findFreeWorkerKey +findFreeWorkerNodeKey +flushTasksQueue +flushTasksQueueByWorker internalBusy isMain registerWorkerMessageListener -removeWorker +removeWorkerNode sendToWorker setWorkerChoiceStrategy setupHook +tasksQueueLength workerListener
    @@ -129,17 +135,17 @@ When the maximum number of threads is reached, an event is emitted. If you want

    Returns DynamicThreadPool<Data, Response>

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

    emitter?: PoolEmitter
    -

    {@inheritDoc}

    -
    +
  • Defined in src/pools/abstract-pool.ts:33
  • filePath: string
    @@ -147,14 +153,14 @@ When the maximum number of threads is reached, an event is emitted. If you want
    -
    - +
  • Defined in src/pools/abstract-pool.ts:68
  • +
    +
    max: number

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

    +
  • Defined in src/pools/thread/dynamic.ts:31
  • numberOfWorkers: number
    @@ -162,7 +168,7 @@ When the maximum number of threads is reached, an event is emitted. If you want
    +
  • Defined in src/pools/abstract-pool.ts:67
  • opts: PoolOptions<ThreadWorkerWithMessageChannel>
    @@ -170,7 +176,7 @@ When the maximum number of threads is reached, an event is emitted. If you want
    +
  • Defined in src/pools/abstract-pool.ts:69
  • promiseResponseMap: Map<string, PromiseResponseWrapper<ThreadWorkerWithMessageChannel, Response>> = ...
    @@ -183,24 +189,24 @@ When the maximum number of threads is reached, an event is emitted. If you want
    +
  • Defined in src/pools/abstract-pool.ts:43
  • workerChoiceStrategyContext: WorkerChoiceStrategyContext<ThreadWorkerWithMessageChannel, Data, Response>
    -

    Worker choice strategy instance implementing the worker choice algorithm.

    -

    Default to a strategy implementing a round robin algorithm.

    +

    Worker choice strategy context referencing a worker choice algorithm implementation.

    +

    Default to a round robin algorithm.

    -
    - -
    workers: WorkerType<ThreadWorkerWithMessageChannel>[] = []
    -

    {@inheritDoc}

    -
    +
    + +
    workerNodes: WorkerNode<ThreadWorkerWithMessageChannel, Data>[] = []
    +
    +

    Inherit Doc

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

    @@ -208,45 +214,56 @@ When the maximum number of threads is reached, an event is emitted. If you want
    +
  • Defined in src/pools/thread/dynamic.ts:49
  • +
  • Defined in src/pools/thread/dynamic.ts:44
  • +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:156
  • +
  • Defined in src/pools/thread/dynamic.ts:39
  • Methods

    @@ -271,14 +288,14 @@ Can be overridden.

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:307
  • +
  • Defined in src/pools/thread/fixed.ts:85
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:296
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:340
  • +
  • Defined in src/pools/abstract-pool.ts:406
  • +
  • Defined in src/pools/thread/fixed.ts:78
  • +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:259
  • +
  • Defined in src/pools/thread/fixed.ts:54
  • +
    + +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:236
  • +
    +
    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:563
  • +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:221
  • +
  • Defined in src/pools/thread/fixed.ts:49
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:545
  • +
  • Defined in src/pools/thread/fixed.ts:62
  • +
  • Defined in src/pools/abstract-pool.ts:189
  • +
  • Defined in src/pools/abstract-pool.ts:281
  • +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:429
  • Generated using TypeDoc