X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=f82f1fc3b8045fa92161f421312a9d7a19dec614;hb=41e3e08eb7fbcde0a69cea17e697aacb222990a6;hp=b8d02a3b8d2306644cd511e74b60732eaf82652f;hpb=8d20e449d72975f6add9177d1097d5a204d14f71;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index b8d02a3b..3ea66d2b 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,13 +1,13 @@ -FixedThreadPool | poolifier
+FixedThreadPool | poolifier - v2.6.45
-
+
  • The search index is not available
  • poolifier - v2.6.45 +
    @@ -17,8 +17,6 @@

    Class FixedThreadPool<Data, Response>

    A thread pool with a fixed number of threads.

    -

    It is possible to perform tasks in sync or asynchronous mode as you prefer.

    -

    This pool selects the threads in a round robin fashion.

    Author

    Alessandro Pio Ardizio

    @@ -30,37 +28,38 @@
    • 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.

    Hierarchy

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

    Constructors

    - +
    • @@ -129,7 +138,7 @@
  • -
    opts: PoolOptions<ThreadWorkerWithMessageChannel> = {}
    +
    opts: ThreadPoolOptions = {}

    Options for this fixed thread pool.

  • @@ -137,7 +146,7 @@
    +
  • Defined in src/pools/thread/fixed.ts:46
  • Properties

    @@ -146,16 +155,19 @@

    Emitter on which events can be listened to.

    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:68
  • filePath: string
    @@ -164,7 +176,16 @@
    +
  • Defined in src/pools/abstract-pool.ts:116
  • +
    + +
    max?: number
    +

    Dynamic pool maximum size property placeholder.

    +
    +
    numberOfWorkers: number
    @@ -173,20 +194,20 @@
    +
  • Defined in src/pools/abstract-pool.ts:115
  • -
    opts: PoolOptions<ThreadWorkerWithMessageChannel>
    -

    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:

    +
  • Defined in src/pools/abstract-pool.ts:77
  • -
    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:83
  • - -
    workerNodes: WorkerNode<ThreadWorkerWithMessageChannel, Data>[] = []
    + +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

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

    @@ -230,7 +250,7 @@
    +
  • Defined in src/pools/thread/fixed.ts:135
  • +
  • Defined in src/pools/abstract-pool.ts:722
  • -
    +
  • Defined in src/pools/abstract-pool.ts:342
  • +
    -
    -
    +
  • Defined in src/pools/abstract-pool.ts:555
  • +
    -
    +
  • Defined in src/pools/abstract-pool.ts:548
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:125
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:130
  • Methods

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

    -
    - +
  • Defined in src/pools/abstract-pool.ts:905
  • +
    + +
    +
    +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:1152
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:1108
  • +
  • Defined in src/pools/thread/fixed.ts:117
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:850
  • +
    +
    +
  • Defined in src/pools/thread/fixed.ts:60
  • +
  • Defined in src/pools/abstract-pool.ts:636
  • +
  • Defined in src/pools/abstract-pool.ts:779
  • +
    + +
    +
    + +
    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:738
  • +
  • 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:80
  • +
  • Defined in src/pools/abstract-pool.ts:650
  • +
  • Defined in src/pools/abstract-pool.ts:603
  • +
  • Defined in src/pools/abstract-pool.ts:622
  • +
  • Defined in src/pools/abstract-pool.ts:889
  • +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:1372
  • @@ -712,6 +909,7 @@ Can be overridden

  • constructor
  • emitter
  • filePath
  • +
  • max
  • numberOfWorkers
  • opts
  • promiseResponseMap
  • @@ -720,79 +918,64 @@ Can be overridden

  • busy
  • full
  • info
  • -
  • maxSize
  • -
  • minSize
  • +
  • maxSize
  • +
  • minSize
  • +
  • ready
  • type
  • +
  • utilization
  • worker
  • afterTaskExecutionHook
  • -
  • afterWorkerSetup
  • +
  • afterWorkerNodeSetup
  • beforeTaskExecutionHook
  • -
  • chooseWorkerNode
  • -
  • createAndSetupWorker
  • +
  • checkDynamicPoolSize
  • +
  • createAndSetupDynamicWorkerNode
  • +
  • createAndSetupWorkerNode
  • createWorker
  • destroy
  • -
  • destroyWorker
  • +
  • destroyWorkerNode
  • enableTasksQueue
  • execute
  • +
  • flushTasksQueue
  • +
  • getWorkerInfo
  • +
  • hasWorkerNodeBackPressure
  • internalBusy
  • isMain
  • +
  • listTaskFunctions
  • registerWorkerMessageListener
  • +
  • sendKillMessageToWorker
  • +
  • sendStartupMessageToWorker
  • sendToWorker
  • setTasksQueueOptions
  • setWorkerChoiceStrategy
  • setWorkerChoiceStrategyOptions
  • setupHook
  • +
  • start
  • workerListener
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file