X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=2ad84030c0ad3877aa7c0fff0a4e8cf19f0d82a8;hb=6be0ab6d5c78c8e91cc4668d3d03db95f15cbfab;hp=d010c608847cfac4c323c60c914ac16d630a7186;hpb=65ec4e64a4690b019d3ef86c97aa7182b715f539;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index d010c608..2ad84030 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

+ +

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,25 +115,28 @@
  • 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

    + +
    +
  • +
    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.

    -
    +
    + +
    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
  • +
  • Task
  • +
  • TaskError
  • +
  • TaskPerformance
  • +
  • TaskStatistics
  • +
  • TaskStatisticsRequirements
  • +
  • TasksQueueOptions
  • +
  • ThreadPoolOptions
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerNode
  • +
  • WorkerOptions
  • +
  • WorkerStatistics
  • +
  • WorkerUsage
  • +
  • Draft
  • +
  • ErrorHandler
  • +
  • ExitHandler
  • +
  • KillBehavior
  • +
  • Measurement
  • +
  • MessageHandler
  • +
  • OnlineHandler
  • +
  • PoolEvent
  • +
  • PoolType
  • +
  • TaskFunctions
  • +
  • ThreadWorkerWithMessageChannel
  • +
  • WorkerAsyncFunction
  • +
  • WorkerChoiceStrategy
  • +
  • WorkerFunction
  • +
  • WorkerSyncFunction
  • +
  • WorkerType
  • +
  • KillBehaviors
  • +
  • Measurements
  • +
  • PoolEvents
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • Generated using TypeDoc

    \ No newline at end of file