X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=099206139e29173127d6ca262d7b9a986368288c;hb=c4424e52e4924efa5eef704cb5dcb82f2760e0da;hp=b8d02a3b8d2306644cd511e74b60732eaf82652f;hpb=8d20e449d72975f6add9177d1097d5a204d14f71;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index b8d02a3b..09920613 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,4 +1,4 @@ -FixedThreadPool | poolifier
+FixedThreadPool | poolifier - v2.6.23
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.23
    @@ -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:34
  • @@ -74,24 +72,30 @@ info maxSize minSize +ready type +utilization worker

    Methods

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

    Options for this fixed thread pool.

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

    @@ -146,8 +150,9 @@

    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.
    • +
    • 'full': Emitted when the pool is dynamic and the number of workers created has reached the maximum size expected.
    • +
    • '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.
    • 'error': Emitted when an uncaught error occurs.
    • 'taskError': Emitted when an error occurs while executing a task.
    @@ -155,7 +160,7 @@
    +
  • Defined in src/pools/abstract-pool.ts:64
  • filePath: string
    @@ -164,7 +169,7 @@
    +
  • Defined in src/pools/abstract-pool.ts:104
  • numberOfWorkers: number
    @@ -173,20 +178,20 @@
    +
  • Defined in src/pools/abstract-pool.ts:103
  • - -

    Options for the pool.

    + +

    Options for this fixed thread pool.

    +
  • Defined in src/pools/thread/fixed.ts:48
  • -
    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:74
  • -
    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:80
  • -
    workerNodes: WorkerNode<ThreadWorkerWithMessageChannel, Data>[] = []
    +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

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

    @@ -230,7 +234,7 @@
    +
  • Defined in src/pools/thread/fixed.ts:140
  • +
  • Defined in src/pools/abstract-pool.ts:606
  • +
  • Defined in src/pools/abstract-pool.ts:301
  • +
  • Defined in src/pools/thread/fixed.ts:135
  • +
  • Defined in src/pools/thread/fixed.ts:130
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:120
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:125
  • 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:962
  • Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:712
  • +
    + +
    +
    +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:911
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:871
  • +
  • Defined in src/pools/thread/fixed.ts:112
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:675
  • +
    +
    +
  • Defined in src/pools/thread/fixed.ts:59
  • +
  • Defined in src/pools/abstract-pool.ts:571
  • +
  • Defined in src/pools/abstract-pool.ts:643
  • +
    + +
    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:622
  • +
  • Defined in src/pools/thread/fixed.ts:54
  • Returns void

    Returns void

    +
  • Defined in src/pools/thread/fixed.ts:102
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:76
  • +
  • Defined in src/pools/abstract-pool.ts:583
  • +
  • Defined in src/pools/abstract-pool.ts:541
  • +
  • Defined in src/pools/abstract-pool.ts:560
  • +
  • Defined in src/pools/abstract-pool.ts:696
  • +
  • Defined in src/pools/abstract-pool.ts:1045
  • +
  • WorkerTypes
  • +
  • availableParallelism
  • Generated using TypeDoc

    \ No newline at end of file