X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=9f96592eaacbdf0f88bd9052a5770001a57d4ec0;hb=cb4889b43e6935f6dd70d8011ba085c9ca7218ba;hp=099206139e29173127d6ca262d7b9a986368288c;hpb=f4ff239c096df6dfb39c94eb3f83fd070d3d85d8;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index 09920613..9f96592e 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,13 +1,13 @@ -FixedThreadPool | poolifier - v2.6.23
+FixedThreadPool | poolifier - v2.6.41
-
+
  • The search index is not available
  • poolifier - v2.6.41 +
    @@ -45,20 +45,21 @@ +
  • Defined in src/pools/thread/fixed.ts:35
  • - +

    Properties

    @@ -150,17 +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 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.
    • +
    • '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
    @@ -169,7 +175,16 @@
    +
  • Defined in src/pools/abstract-pool.ts:117
  • +
    + +
    max?: number
    +

    Dynamic pool maximum size property placeholder.

    +
    +
    numberOfWorkers: number
    @@ -178,7 +193,7 @@
    +
  • Defined in src/pools/abstract-pool.ts:116
  • @@ -187,7 +202,7 @@
    +
  • Defined in src/pools/thread/fixed.ts:49
  • promiseResponseMap: Map<string, PromiseResponseWrapper<Response>> = ...
    @@ -201,7 +216,7 @@
    +
  • Defined in src/pools/abstract-pool.ts:78
  • workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>
    @@ -210,16 +225,16 @@
    +
  • Defined in src/pools/abstract-pool.ts:84
  • - +
    workerNodes: IWorkerNode<Worker, Data>[] = []

    Pool worker nodes.

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

    @@ -234,7 +249,7 @@
    +
  • Defined in src/pools/thread/fixed.ts:135
  • +
  • Defined in src/pools/abstract-pool.ts:689
  • -
    +
  • Defined in src/pools/abstract-pool.ts:350
  • +
    -
      +
      • get maxSize(): number
      • The pool maximum size.

        Returns number

    -
    +
  • Defined in src/pools/abstract-pool.ts:562
  • +
    -
      +
      • get minSize(): number
      • The pool minimum size.

        Returns number

    +
  • Defined in src/pools/abstract-pool.ts:555
  • +
  • Defined in src/pools/abstract-pool.ts:507
  • +
  • Defined in src/pools/thread/fixed.ts:125
  • +
  • Defined in src/pools/abstract-pool.ts:524
  • +
  • Defined in src/pools/thread/fixed.ts:130
  • Methods

    @@ -361,7 +376,7 @@ Can be overridden.

    +
  • Defined in src/pools/abstract-pool.ts:888
  • +
  • Defined in src/pools/abstract-pool.ts:1162
  • +
  • Defined in src/pools/abstract-pool.ts:858
  • +
  • Defined in src/pools/abstract-pool.ts:187
  • +
  • Defined in src/pools/abstract-pool.ts:1105
  • +
  • Defined in src/pools/abstract-pool.ts:1061
  • +
  • Defined in src/pools/thread/fixed.ts:117
  • +
  • Defined in src/pools/abstract-pool.ts:803
  • +
  • Defined in src/pools/thread/fixed.ts:60
    • -

      Enables/disables the worker tasks queue in this pool.

      +

      Enables/disables the worker node tasks queue in this pool.

      Parameters

      • enable: boolean
        -

        Whether to enable or disable the worker tasks queue.

        +

        Whether to enable or disable the worker node tasks queue.

      • Optional tasksQueueOptions: TasksQueueOptions
        -

        The worker tasks queue options.

        +

        The worker node tasks queue options.

      Returns void

    +
  • Defined in src/pools/abstract-pool.ts:643
    • - +
    • Executes the specified function in the worker constructor with the task data input parameter.

      @@ -533,12 +548,17 @@ Can be overridden.

      • Optional data: Data
        -

        The task input data for the specified task function. This can only be structured-cloneable data.

        +

        The optional task input data for the specified task function. This can only be structured-cloneable data.

      • Optional name: string
        -

        The name of the task function to execute. If not specified, the default task function will be executed.

        +

        The optional name of the task function to execute. If not specified, the default task function will be executed.

        +
        +
      • +
      • +
        Optional transferList: TransferListItem[]
        +

        An optional array of transferable objects to transfer ownership of. Ownership of the transferred objects is given to the pool's worker_threads worker and they should not be used in the main thread afterwards.

    Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    @@ -546,7 +566,7 @@ Can be overridden.

    +
  • Defined in src/pools/abstract-pool.ts:747
  • +
  • Defined in src/pools/abstract-pool.ts:1491
  • +
  • Defined in src/pools/abstract-pool.ts:1407
  • +
    + +
      + +
    • Internal +

      Whether the worker node has back pressure (i.e. its tasks queue is full).

      +
      +
      +

      Parameters

      +
        +
      • +
        workerNodeKey: number
        +

        The worker node key.

        +
        +
      +

      Returns boolean

      true if the worker node has back pressure, false otherwise.

      + +
    +
  • Defined in src/pools/abstract-pool.ts:705
  • +
  • Defined in src/pools/thread/fixed.ts:55
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:107
  • +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:91
    • - +
    • Sends a message to worker given its worker node key.

      @@ -687,32 +757,37 @@ Can be overridden.

      message: MessageValue<Data, unknown>

      The message.

      +
    • +
    • +
      Optional transferList: TransferListItem[]
      +

      The optional array of transferable objects.

      +

    Returns void

    +
  • Defined in src/pools/thread/fixed.ts:80
  • +
  • Defined in src/pools/abstract-pool.ts:655
  • +
  • Defined in src/pools/abstract-pool.ts:610
  • +
  • Defined in src/pools/abstract-pool.ts:629
  • +
  • Defined in src/pools/abstract-pool.ts:842
  • +
  • Defined in src/pools/abstract-pool.ts:1321
  • @@ -821,6 +896,7 @@ Can be overridden.

  • constructor
  • emitter
  • filePath
  • +
  • max
  • numberOfWorkers
  • opts
  • promiseResponseMap
  • @@ -829,8 +905,8 @@ Can be overridden.

  • busy
  • full
  • info
  • -
  • maxSize
  • -
  • minSize
  • +
  • maxSize
  • +
  • minSize
  • ready
  • type
  • utilization
  • @@ -848,9 +924,12 @@ Can be overridden.

  • execute
  • flushTasksQueue
  • getWorkerInfo
  • +
  • hasWorkerNodeBackPressure
  • internalBusy
  • isMain
  • +
  • listTaskFunctions
  • registerWorkerMessageListener
  • +
  • sendKillMessageToWorker
  • sendStartupMessageToWorker
  • sendToWorker
  • setTasksQueueOptions
  • @@ -859,67 +938,30 @@ Can be overridden.

  • setupHook
  • workerListener
  • +
    -

    Generated using TypeDoc

    -
    \ No newline at end of file +

    Generated using TypeDoc

    +
    \ No newline at end of file