X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=7ea1c393837e025c202e4411c6a7ff46a9b4ef0b;hb=a6b5c73ccccb3ef0ccc24ad462182e3cacee77b4;hp=ae1bb55c438e9e243d1fc59495152f8e86663a3f;hpb=70353024c44987c467dadcec306c699ce4ae1f06;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index ae1bb55c..7ea1c393 100644 --- a/docs/interfaces/IPool.html +++ b/docs/interfaces/IPool.html @@ -1,4 +1,4 @@ -IPool | poolifier
+IPool | poolifier - v2.6.9
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.9
    @@ -17,22 +17,26 @@

    Interface IPool<Worker, Data, Response>

    Contract definition for a poolifier pool.

    -
    +
    +

    Type Parameters

    +

    Type of execution response. This can only be structured-cloneable data.

    +
    +

    Hierarchy

    +
  • Defined in src/pools/pool.ts:164
  • @@ -50,21 +54,20 @@

    Properties

    - +
    destroy: (() => Promise<void>)

    Type declaration

    @@ -73,26 +76,29 @@
    • (): Promise<void>
    • -

      Shutdowns every current worker in this pool.

      +

      Terminates every current worker in this pool.

      -

      Returns Promise<void>

    +
  • Defined in src/pools/pool.ts:199
  • - +
    emitter?: PoolEmitter

    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.
    • -
    • 'error': Emitted when an error occurs.
    • +
    • 'error': Emitted when an uncaught error occurs.
    • +
    • 'taskError': Emitted when an error occurs while executing a task.
    -
    +
  • Defined in src/pools/pool.ts:187
  • - +
    enableTasksQueue: ((enable, tasksQueueOptions?) => void)

    Type declaration

    @@ -109,16 +115,19 @@
  • enable: boolean

    Whether to enable or disable the worker tasks queue.

    -
  • +
    +
  • Optional tasksQueueOptions: TasksQueueOptions

    The worker tasks queue options.

    -
  • -

    Returns void

    +
  • Defined in src/pools/pool.ts:224
  • - +
    execute: ((data?, name?) => Promise<Response>)

    Type declaration

    @@ -134,18 +143,29 @@
    • Optional data: Data
      -

      The task input data for the specified worker function. This can only be serializable data.

      -
    • +

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

      +
      +
    • Optional name: string

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

      -
    + +

    Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    -
    +
  • Defined in src/pools/pool.ts:195
  • +
    + +
    info: PoolInfo
    +

    Pool information.

    +
    +
    - +
    setTasksQueueOptions: ((tasksQueueOptions) => void)

    Type declaration

    @@ -162,12 +182,14 @@
  • tasksQueueOptions: TasksQueueOptions

    The worker tasks queue options.

    -
  • -

    Returns void

    +
  • Defined in src/pools/pool.ts:233
  • - +
    setWorkerChoiceStrategy: ((workerChoiceStrategy, workerChoiceStrategyOptions?) => void)

    Type declaration

    @@ -182,18 +204,21 @@

    Parameters

    • -
      workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"
      +
      workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "LEAST_ELU" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN" | "INTERLEAVED_WEIGHTED_ROUND_ROBIN"

      The worker choice strategy.

      -
    • +
    +
  • Optional workerChoiceStrategyOptions: WorkerChoiceStrategyOptions

    The worker choice strategy options.

    -
  • -

    Returns void

    +
  • Defined in src/pools/pool.ts:206
  • - +
    setWorkerChoiceStrategyOptions: ((workerChoiceStrategyOptions) => void)

    Type declaration

    @@ -210,37 +235,25 @@
  • workerChoiceStrategyOptions: WorkerChoiceStrategyOptions

    The worker choice strategy options.

    -
  • -

    Returns void

    -
    - -
    size: number
    -

    Pool maximum size.

    -
    -
    - -
    type: PoolType
    -

    Pool type.

    -

    If it is 'dynamic', it provides the max property.

    -
    +
  • Defined in src/pools/pool.ts:215
  • - -
    workerNodes: WorkerNode<Worker, Data>[]
    + +
    workerNodes: IWorkerNode<Worker, Data>[]

    Pool worker nodes.

    -
    +
  • Defined in src/pools/pool.ts:176
  • +
  • destroy
  • +
  • emitter
  • +
  • enableTasksQueue
  • +
  • execute
  • +
  • info
  • +
  • setTasksQueueOptions
  • +
  • setWorkerChoiceStrategy
  • +
  • setWorkerChoiceStrategyOptions
  • +
  • workerNodes
  • +
  • AbstractPool
  • +
  • AbstractWorker
  • +
  • CircularArray
  • +
  • ClusterWorker
  • +
  • DynamicClusterPool
  • +
  • DynamicThreadPool
  • +
  • FixedClusterPool
  • +
  • FixedThreadPool
  • +
  • PoolEmitter
  • +
  • Queue
  • +
  • ThreadWorker
  • +
  • WorkerChoiceStrategyContext
  • +
  • ClusterPoolOptions
  • +
  • EventLoopUtilizationMeasurementStatistics
  • +
  • IPool
  • +
  • IWorker
  • +
  • IWorkerChoiceStrategy
  • +
  • IWorkerNode
  • +
  • MeasurementOptions
  • +
  • MeasurementStatistics
  • +
  • MeasurementStatisticsRequirements
  • +
  • MessageValue
  • +
  • PoolInfo
  • +
  • PoolOptions
  • +
  • PromiseResponseWrapper
  • +
  • StrategyPolicy
  • +
  • Task
  • +
  • TaskError
  • +
  • TaskPerformance
  • +
  • TaskStatistics
  • +
  • TaskStatisticsRequirements
  • +
  • TasksQueueOptions
  • +
  • ThreadPoolOptions
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerInfo
  • +
  • WorkerOptions
  • +
  • WorkerStatistics
  • +
  • WorkerUsage
  • +
  • ErrorHandler
  • +
  • ExitHandler
  • +
  • KillBehavior
  • +
  • Measurement
  • +
  • MessageHandler
  • +
  • OnlineHandler
  • +
  • PoolEvent
  • +
  • PoolType
  • +
  • TaskFunctions
  • +
  • WorkerAsyncFunction
  • +
  • WorkerChoiceStrategy
  • +
  • WorkerFunction
  • +
  • WorkerSyncFunction
  • +
  • WorkerType
  • +
  • KillBehaviors
  • +
  • Measurements
  • +
  • PoolEvents
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • +
  • availableParallelism
  • Generated using TypeDoc

    \ No newline at end of file