X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=602223db367cf746ba3d206587e7527035c5ab88;hb=a97f9c80aa49c6152547fb6fa8de4b0f089c2353;hp=df8c5ceec7b5b29a466d15ac970717170e06dbba;hpb=dde90273424a8c6dbfaddcc7e6a771623c521f2c;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index df8c5cee..602223db 100644 --- a/docs/interfaces/IPool.html +++ b/docs/interfaces/IPool.html @@ -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:158
  • @@ -50,20 +54,20 @@

    Properties

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

    Type declaration

    @@ -72,25 +76,29 @@
    • (): Promise<void>
    • -

      Shutdowns every current worker in this pool.

      +

      Terminate every current worker in this pool.

      -

      Returns Promise<void>

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

    Emitter on which events can be listened to.

    Events that can currently be listened to:

    -
    +
  • Defined in src/pools/pool.ts:181
  • - +
    enableTasksQueue: ((enable, tasksQueueOptions?) => void)

    Type declaration

    @@ -107,39 +115,57 @@
  • 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:218
  • - -
    execute: ((data?) => Promise<Response>)
    + +
    execute: ((data?, name?) => Promise<Response>)

    Type declaration

    Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    -
    +
    + +
    info: PoolInfo
    +

    Pool information.

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

    Type declaration

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

    The worker tasks queue options.

    -
  • -

    Returns void

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

    Type declaration

    @@ -176,18 +204,21 @@

    Parameters

    +
  • Optional workerChoiceStrategyOptions: WorkerChoiceStrategyOptions

    The worker choice strategy options.

    -
  • -

    Returns void

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

    Type declaration

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

    The worker choice strategy options.

    -
  • -

    Returns void

    -
    - -
    type: PoolType
    -

    Pool type.

    -

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

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

    Pool worker nodes.

    -
    +
  • Defined in src/pools/pool.ts:170
  • +
  • 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
  • +
  • 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