X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=cad736ea1cc2a5d56e3b58b17662dcba8b2e54f9;hb=c62a9bbc12416e26acbb3b86b5090d6186b14b60;hp=a1fecefd0d80aef3fcc6686da10fdc2d0c0537c6;hpb=afa30fd0dd5bbc5d305cc30be663966a449efc08;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index a1fecefd..cad736ea 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,4 +1,4 @@ -FixedThreadPool | poolifier
+FixedThreadPool | poolifier - v2.6.20
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.20
    @@ -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:602
  • +
  • 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:947
  • Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:697
  • +
    + +
    +
    +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:896
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:856
  • +
  • Defined in src/pools/thread/fixed.ts:112
  • -
    - +
  • Defined in src/pools/abstract-pool.ts:660
  • +
    +
    +
  • Defined in src/pools/thread/fixed.ts:59
  • +
  • Defined in src/pools/abstract-pool.ts:567
  • +
  • Defined in src/pools/abstract-pool.ts:628
  • +
    + +
    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:618
  • +
  • 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:579
  • +
  • Defined in src/pools/abstract-pool.ts:537
  • +
  • Defined in src/pools/abstract-pool.ts:556
  • +
  • Defined in src/pools/abstract-pool.ts:681
  • +
  • Defined in src/pools/abstract-pool.ts:1030
  • +
  • WorkerTypes
  • +
  • availableParallelism
  • Generated using TypeDoc

    \ No newline at end of file