X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=405c43bc4f1eda2ed96899097ca333e09c83ea99;hb=fd98bbb90c7202f5dd734c029f3cee2f997aea24;hp=b8d02a3b8d2306644cd511e74b60732eaf82652f;hpb=15d6dfaf877ec6a99e2bde48cb3c8a9e8671c075;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index b8d02a3b..c2557b46 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,4 +1,4 @@ -FixedThreadPool | poolifier
+FixedThreadPool | poolifier - v2.6.32
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.32
    @@ -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,24 +28,24 @@
    • 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
  • @@ -61,6 +59,7 @@

    Properties

    Methods

  • -
    opts: PoolOptions<ThreadWorkerWithMessageChannel> = {}
    +
    opts: ThreadPoolOptions = {}

    Options for this fixed thread pool.

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

    @@ -146,16 +154,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 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:65
  • filePath: string
    @@ -164,7 +175,16 @@
    +
  • Defined in src/pools/abstract-pool.ts:114
  • +
    + +
    max?: number
    +

    Dynamic pool maximum size property placeholder.

    +
    +
    numberOfWorkers: number
    @@ -173,20 +193,20 @@
    +
  • Defined in src/pools/abstract-pool.ts:113
  • - -

    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:75
  • -
    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:81
  • - -
    workerNodes: WorkerNode<ThreadWorkerWithMessageChannel, Data>[] = []
    + +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

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

    @@ -230,7 +249,7 @@
    +
  • Defined in src/pools/thread/fixed.ts:132
  • +
  • Defined in src/pools/abstract-pool.ts:675
  • -
    +
  • Defined in src/pools/abstract-pool.ts:345
  • +
    -
    -
    +
  • Defined in src/pools/abstract-pool.ts:546
  • +
    -
    +
  • Defined in src/pools/abstract-pool.ts:539
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:122
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:127
  • Methods

    -
    - -
    +
    + +
      +
    • -

      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:1144
  • Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:842
  • +
    +
    +
    + +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:1087
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:1043
  • +
  • Defined in src/pools/thread/fixed.ts:114
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:787
  • +
    +
    +
  • Defined in src/pools/thread/fixed.ts:60
  • +
  • Defined in src/pools/abstract-pool.ts:627
  • +
  • Defined in src/pools/abstract-pool.ts:725
  • +
    + +
    +
    + +
    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:691
  • +
  • Defined in src/pools/thread/fixed.ts:55
  • +
    + +

    Returns void

    Returns void

    +
  • Defined in src/pools/thread/fixed.ts:104
  • +
    + +
    +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:77
  • +
  • Defined in src/pools/abstract-pool.ts:639
  • +
  • Defined in src/pools/abstract-pool.ts:594
  • +
  • Defined in src/pools/abstract-pool.ts:613
  • +
  • Defined in src/pools/abstract-pool.ts:826
  • +
  • Defined in src/pools/abstract-pool.ts:1261
  • +
  • WorkerTypes
  • +
  • availableParallelism
  • Generated using TypeDoc

    \ No newline at end of file