X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=f959865bc869ed98dcca0b015ecf864bebeb1814;hb=3557031d88b5ff00ea86695728b3ba3af46e9faa;hp=b8d02a3b8d2306644cd511e74b60732eaf82652f;hpb=15d6dfaf877ec6a99e2bde48cb3c8a9e8671c075;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index b8d02a3b..f959865b 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,4 +1,4 @@ -FixedThreadPool | poolifier
+FixedThreadPool | poolifier - v2.6.12
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.12
    @@ -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:32
  • @@ -74,15 +72,19 @@ info maxSize minSize +ready +starting type +utilization worker

    Methods

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

    Options for this fixed thread pool.

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

    @@ -146,8 +147,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 +157,7 @@
    +
  • Defined in src/pools/abstract-pool.ts:59
  • filePath: string
    @@ -164,7 +166,7 @@
    +
  • Defined in src/pools/abstract-pool.ts:97
  • numberOfWorkers: number
    @@ -173,19 +175,19 @@
    +
  • Defined in src/pools/abstract-pool.ts:96
  • - -

    Options for the pool.

    + +

    Options for this fixed thread pool.

    +
  • Defined in src/pools/thread/fixed.ts:46
  • -
    promiseResponseMap: Map<string, PromiseResponseWrapper<ThreadWorkerWithMessageChannel, Response>> = ...
    +
    promiseResponseMap: Map<string, PromiseResponseWrapper<Worker, Response>> = ...

    The execution response promise map.

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

    Pool worker nodes.

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

    @@ -230,7 +231,7 @@
    +
  • Defined in src/pools/thread/fixed.ts:96
  • +
  • Defined in src/pools/abstract-pool.ts:563
  • +
  • Defined in src/pools/abstract-pool.ts:269
  • +
  • Defined in src/pools/thread/fixed.ts:91
  • +
  • Defined in src/pools/thread/fixed.ts:86
  • +
    + +
    +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:76
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:81
  • Methods

    @@ -319,12 +351,12 @@ Can be overridden.

    Parameters

    @@ -332,32 +364,32 @@ Can be overridden.

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

        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.

        +

        Function that can be hooked up when a worker has been newly created and moved to the pool worker nodes. +Can be overridden.

        Parameters

        Returns void

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

    -
    - +
  • Defined in src/pools/abstract-pool.ts:668
  • +
    + +
    +
    +
    +
  • Defined in src/pools/abstract-pool.ts:1007
  • +
  • Defined in src/pools/abstract-pool.ts:941
  • +
  • Defined in src/pools/thread/fixed.ts:68
  • +
  • Defined in src/pools/abstract-pool.ts:623
  • +
  • Defined in src/pools/thread/fixed.ts:57
  • +
  • Defined in src/pools/abstract-pool.ts:528
  • +
  • Defined in src/pools/abstract-pool.ts:588
  • +
  • Defined in src/pools/abstract-pool.ts:579
  • -
    - -
    +
  • Defined in src/pools/thread/fixed.ts:52
  • +
  • Defined in src/pools/thread/fixed.ts:63
  • +
  • Defined in src/pools/abstract-pool.ts:540
  • +
  • Defined in src/pools/abstract-pool.ts:498
  • +
  • Defined in src/pools/abstract-pool.ts:517
  • +
  • Defined in src/pools/abstract-pool.ts:652
  • Returns void

    The listener function to execute when a message is received from a worker.

    +
  • Defined in src/pools/abstract-pool.ts:1038
  • +
  • WorkerTypes
  • +
  • availableParallelism
  • Generated using TypeDoc

    \ No newline at end of file