X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=c44a88aa1c850c9d206bd19790d7e6b594697ce1;hb=b667be1103b9362ae29d094de05f812468464d4f;hp=e663f0b86dabc2f4f001270c706004c10dd7bad5;hpb=a2742ce794032ee57b3ec1203c500b1aecca34f0;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index e663f0b8..c44a88aa 100644 --- a/docs/interfaces/IPool.html +++ b/docs/interfaces/IPool.html @@ -1,4 +1,4 @@ -IPool | poolifier
+IPool | poolifier - v2.6.8
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier - v2.6.8
    @@ -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:176
  • @@ -50,21 +54,20 @@

    Properties

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

    Type declaration

    @@ -73,13 +76,14 @@
    • (): 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:211
  • - +
    emitter?: PoolEmitter

    Emitter on which events can be listened to.

    Events that can currently be listened to:

    @@ -89,11 +93,12 @@
  • 'error': Emitted when an uncaught error occurs.
  • 'taskError': Emitted when an error occurs while executing a task.
  • -
    +
  • Defined in src/pools/pool.ts:199
  • - +
    enableTasksQueue: ((enable, tasksQueueOptions?) => void)

    Type declaration

    @@ -110,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:236
  • - +
    execute: ((data?, name?) => Promise<Response>)

    Type declaration

    @@ -135,25 +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:207
  • - +
    info: PoolInfo

    Pool information.

    -
    +
  • Defined in src/pools/pool.ts:184
  • - +
    setTasksQueueOptions: ((tasksQueueOptions) => void)

    Type declaration

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

    The worker tasks queue options.

    -
  • -

    Returns void

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

    Type declaration

    @@ -190,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:218
  • - +
    setWorkerChoiceStrategyOptions: ((workerChoiceStrategyOptions) => void)

    Type declaration

    @@ -218,30 +235,25 @@
  • workerChoiceStrategyOptions: WorkerChoiceStrategyOptions

    The worker choice strategy options.

    -
  • -

    Returns void

    -
    - -
    type: "fixed" | "dynamic"
    -

    Pool type.

    -

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

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

    Pool worker nodes.

    -
    +
  • Defined in src/pools/pool.ts:188
  • +
  • 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
  • +
  • MeasurementOptions
  • +
  • MeasurementStatistics
  • +
  • MeasurementStatisticsRequirements
  • +
  • MessageValue
  • +
  • PoolInfo
  • +
  • PoolOptions
  • +
  • PromiseResponseWrapper
  • +
  • StrategyPolicy
  • +
  • Task
  • +
  • TaskError
  • +
  • TaskPerformance
  • +
  • TaskStatistics
  • +
  • TaskStatisticsRequirements
  • +
  • TasksQueueOptions
  • +
  • ThreadPoolOptions
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerInfo
  • +
  • WorkerNode
  • +
  • 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