X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=e926d25229e0cdc77a8a43516f5ebce81c85d629;hb=6c525543a7ed67a926b7c1f4bf98985aaad1f088;hp=25b842f78dd68afa2c33807fd36910b47c936a03;hpb=1b0aa06b3ab5cf8ae8bd135087143165889901cc;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index 25b842f7..e926d252 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -1,4 +1,4 @@ -DynamicThreadPool | poolifier
+DynamicThreadPool | poolifier
-
+
@@ -73,28 +73,22 @@ When the maximum number of threads is reached and workers are busy, an event is

Methods

-
@@ -102,7 +96,7 @@ When the maximum number of threads is reached and workers are busy, an event is
-

Returns DynamicThreadPool<Data, Response>

Properties

emitter?: PoolEmitter
-
-

Inherit Doc

+
  • Defined in src/pools/abstract-pool.ts:41
  • filePath: string
    @@ -153,14 +152,14 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:76
  • max: number

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

    +
  • Defined in src/pools/thread/dynamic.ts:31
  • numberOfWorkers: number
    @@ -168,7 +167,7 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:75
  • @@ -176,37 +175,37 @@ When the maximum number of threads is reached and workers are busy, an event is
    +
  • Defined in src/pools/abstract-pool.ts:77
  • -
    promiseResponseMap: Map<string, PromiseResponseWrapper<ThreadWorkerWithMessageChannel, Response>> = ...
    -

    The promise response map.

    +
    promiseResponseMap: Map<string, PromiseResponseWrapper<ThreadWorkerWithMessageChannel, Response>> = ...
    +

    The execution response promise map.

    • key: The message id of each submitted task.
    • -
    • value: An object that contains the worker, the promise resolve and reject callbacks.
    • +
    • value: An object that contains the worker, the execution response promise resolve and reject callbacks.
    -

    When we receive a message from the worker we get a map entry with the promise resolve/reject bound to the message.

    +

    When we receive a message from the worker, we get a map entry with the promise resolve/reject bound to the message id.

    +
  • Defined in src/pools/abstract-pool.ts:51
  • -
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<ThreadWorkerWithMessageChannel, Data, Response>
    +
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<ThreadWorkerWithMessageChannel, 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:61
  • -
    workerNodes: WorkerNode<ThreadWorkerWithMessageChannel, Data>[] = []
    -
    -

    Inherit Doc

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

    @@ -214,23 +213,25 @@ When the maximum number of threads is reached and workers are busy, an event is
    • get busy(): boolean
    • -
      -

      Inherit Doc

      +

      Whether the pool is busy or not.

      +

      The pool busyness boolean status.

      +

      Returns boolean

    +
  • Defined in src/pools/thread/dynamic.ts:49
  • +
  • Defined in src/pools/thread/dynamic.ts:44
  • +
  • Defined in src/pools/abstract-pool.ts:186
  • +
  • Defined in src/pools/abstract-pool.ts:176
  • +
  • Defined in src/pools/thread/dynamic.ts:39
  • Methods

    -
    - +
    +
      - +
    • -

      Hook executed after the worker task promise resolution. +

      Hook executed after the worker task execution. Can be overridden.

      @@ -282,35 +284,38 @@ Can be overridden.

      The worker.

    • -
      message: MessageValue<Response, unknown>
      +
      message: MessageValue<Response, unknown>

      The received message.

    Returns void

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

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

      Hook executed before the worker task promise resolution. +

      Hook executed before the worker task execution. Can be overridden.

      @@ -321,23 +326,23 @@ Can be overridden.

      The worker node key.

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:316
  • +
  • Defined in src/pools/abstract-pool.ts:360
  • +
  • Defined in src/pools/abstract-pool.ts:422
  • -
    - -
    +
  • Defined in src/pools/thread/fixed.ts:78
  • +
  • Defined in src/pools/abstract-pool.ts:279
  • Returns Promise<void>

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

    Returns Promise<Response>

    +
  • Defined in src/pools/abstract-pool.ts:248
  • -
    - -
    -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:241
  • +
  • Defined in src/pools/abstract-pool.ts:236
  • +
  • Defined in src/pools/thread/fixed.ts:49
  • -
    - -
    +
  • Defined in src/pools/thread/fixed.ts:70
  • Returns void

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

    +
  • Defined in src/pools/abstract-pool.ts:209
  • -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:301
  • - +
    +
    -
    +
  • constructor
  • +
  • emitter
  • +
  • filePath
  • +
  • max
  • +
  • numberOfWorkers
  • +
  • opts
  • +
  • promiseResponseMap
  • +
  • workerChoiceStrategyContext
  • +
  • workerNodes
  • +
  • busy
  • +
  • full
  • +
  • numberOfQueuedTasks
  • +
  • numberOfRunningTasks
  • +
  • type
  • +
  • afterTaskExecutionHook
  • +
  • afterWorkerSetup
  • +
  • beforeTaskExecutionHook
  • +
  • chooseWorkerNode
  • +
  • createAndSetupWorker
  • +
  • createWorker
  • +
  • destroy
  • +
  • destroyWorker
  • +
  • execute
  • +
  • findFreeWorkerNodeKey
  • +
  • internalBusy
  • +
  • isMain
  • +
  • registerWorkerMessageListener
  • +
  • sendToWorker
  • +
  • setWorkerChoiceStrategy
  • +
  • setupHook
  • +
  • workerListener
  • + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file