X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FIPool.html;h=740e3b8eb00235c2d5f748a35952d59f3e1aafe5;hb=71056a0ac555e096c1428d6341ef45c7980a6332;hp=0c22722b96bf9a41becf44dc0b8b7c85a7cdf5be;hpb=8d98e603c79d8d00b2b6a33e5f732701a7466234;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index 0c22722b..740e3b8e 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:156
  • @@ -50,20 +54,20 @@

    Properties

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

    Type declaration

    @@ -74,11 +78,12 @@
  • Shutdowns every current worker in this pool.

    -

    Returns Promise<void>

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

    Emitter on which events can be listened to.

    Events that can currently be listened to:

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

    Type declaration

    @@ -135,24 +144,28 @@
  • Optional data: Data

    The task input data for the specified worker function. This can only be serializable 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:187
  • - +
    info: PoolInfo

    Pool information.

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

    Type declaration

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

    The worker tasks queue options.

    -
  • -

    Returns void

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

    Type declaration

    @@ -191,16 +206,19 @@
  • workerChoiceStrategy: "ROUND_ROBIN" | "LEAST_USED" | "LEAST_BUSY" | "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:198
  • - +
    setWorkerChoiceStrategyOptions: ((workerChoiceStrategyOptions) => void)

    Type declaration

    @@ -217,22 +235,25 @@
  • workerChoiceStrategyOptions: WorkerChoiceStrategyOptions

    The worker choice strategy options.

    -
  • -

    Returns void

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

    Pool worker nodes.

    -
    +
  • Defined in src/pools/pool.ts:168
  • +
  • destroy
  • +
  • emitter
  • +
  • enableTasksQueue
  • +
  • execute
  • +
  • info
  • +
  • setTasksQueueOptions
  • +
  • setWorkerChoiceStrategy
  • +
  • setWorkerChoiceStrategyOptions
  • +
  • workerNodes
  • +
  • AbstractPool
  • +
  • AbstractWorker
  • +
  • CircularArray
  • +
  • ClusterWorker
  • +
  • DynamicClusterPool
  • +
  • DynamicThreadPool
  • +
  • FixedClusterPool
  • +
  • FixedThreadPool
  • +
  • PoolEmitter
  • +
  • Queue
  • +
  • ThreadWorker
  • +
  • WorkerChoiceStrategyContext
  • +
  • ClusterPoolOptions
  • +
  • IPool
  • +
  • IWorker
  • +
  • IWorkerChoiceStrategy
  • +
  • MessageValue
  • +
  • PoolInfo
  • +
  • PoolOptions
  • +
  • PromiseResponseWrapper
  • +
  • Task
  • +
  • TaskPerformance
  • +
  • TaskStatistics
  • +
  • TasksQueueOptions
  • +
  • TasksUsage
  • +
  • ThreadPoolOptions
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerNode
  • +
  • WorkerOptions
  • +
  • WorkerStatistics
  • +
  • Draft
  • +
  • ErrorHandler
  • +
  • ExitHandler
  • +
  • KillBehavior
  • +
  • MessageHandler
  • +
  • OnlineHandler
  • +
  • PoolEvent
  • +
  • PoolType
  • +
  • TaskFunctions
  • +
  • ThreadWorkerWithMessageChannel
  • +
  • WorkerAsyncFunction
  • +
  • WorkerChoiceStrategy
  • +
  • WorkerFunction
  • +
  • WorkerSyncFunction
  • +
  • WorkerType
  • +
  • KillBehaviors
  • +
  • PoolEvents
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • Generated using TypeDoc

    \ No newline at end of file