X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=405c43bc4f1eda2ed96899097ca333e09c83ea99;hb=2a6631992868d900762f62e4c228dce4e4ee549a;hp=40cc3626ea24bbdd9c5fa631a5c5256f6eb3f54f;hpb=2c94c3a5da9d6b4a0ac992386907d8a406ee38f7;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index 40cc3626..405c43bc 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -17,34 +17,35 @@

Class FixedThreadPool<Data, Response>

A thread pool with a fixed number of threads.

-

It is possible to perform tasks in sync or asynchronous mode as you prefer.

-

This pool selects the threads in a round robin fashion.

- -

Author

Alessandro Pio Ardizio

+
+
+

Author

Alessandro Pio Ardizio

-

Since

0.0.1

+

Since

0.0.1

Type Parameters

+

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

+
+

Hierarchy

+
  • Defined in src/pools/thread/fixed.ts:37
  • @@ -52,55 +53,57 @@

    Constructors

    - + -

    Returns FixedThreadPool<Data, Response>

    +
  • Defined in src/pools/thread/fixed.ts:48
  • Properties

    - +
    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 uncaught error occurs.
    • +
    • 'taskError': Emitted when an error occurs while executing a task.
    -
    -
    - +
  • Defined in src/pools/abstract-pool.ts:58
  • +
    +
    filePath: string

    Path to the worker file.

    -
    -
    - +
  • Defined in src/pools/abstract-pool.ts:96
  • +
    +
    numberOfWorkers: number

    Number of workers that this pool should manage.

    -
    -
    - - -

    Options for the pool.

    -
    +
    + + +

    Options for this fixed thread pool.

    +
    +
    +
  • Defined in src/pools/thread/fixed.ts:51
  • - -
    promiseResponseMap: Map<string, PromiseResponseWrapper<ThreadWorkerWithMessageChannel, Response>> = ...
    + +
    promiseResponseMap: Map<string, PromiseResponseWrapper<Worker, Response>> = ...

    The execution response promise map.

    When we receive a message from the worker, we get a map entry with the promise resolve/reject bound to the message id.

    -
    +
  • Defined in src/pools/abstract-pool.ts:68
  • - -
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<ThreadWorkerWithMessageChannel, Data, Response>
    + +
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<Worker, Data, Response>

    Worker choice strategy context referencing a worker choice algorithm implementation.

    -

    Default to a round robin algorithm.

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

    Pool worker nodes.

    -
    +
  • Defined in src/pools/abstract-pool.ts:55
  • Accessors

    - +
    -
    - -
    +
    + +
    -
    - -
    +
    + +
    -
    - -
    +
    + +
    -
    - -
    +
    + +
    -
    - -
    +
    + +
    +
    + +
    +
  • Defined in src/pools/thread/fixed.ts:81
  • +
    + +
    +
    + +

    Methods

    - + -

    Returns void

    -
    - -
    +
    + + +

    Returns void

    +
    +
  • Defined in src/pools/abstract-pool.ts:747
  • - + -

    Returns void

    -
    - +
  • Defined in src/pools/abstract-pool.ts:539
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:790
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:757
  • - +
    +
  • Defined in src/pools/thread/fixed.ts:73
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:500
  • - + +

    Returns Promise<void>

    +
    +
  • Defined in src/pools/thread/fixed.ts:62
  • - + -

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:406
  • - +

    Returns Promise<Response>

    Promise that will be fulfilled when the task is completed.

    -
    +
  • Defined in src/pools/abstract-pool.ts:466
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:457
  • - +
    -
    - -
    +
  • Defined in src/pools/thread/fixed.ts:57
  • - + +

    Returns void

    +
    +
  • Defined in src/pools/thread/fixed.ts:68
  • - + -

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:418
  • - + +

    Returns void

    +
    +
  • Defined in src/pools/abstract-pool.ts:373
  • - + -

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:395
  • - +
    +
  • Defined in src/pools/abstract-pool.ts:523
  • - +

    Returns void

    The listener function to execute when a message is received from a worker.

    -
    +
  • Defined in src/pools/abstract-pool.ts:815
  • +
  • constructor
  • +
  • emitter
  • +
  • filePath
  • +
  • numberOfWorkers
  • +
  • opts
  • +
  • promiseResponseMap
  • +
  • workerChoiceStrategyContext
  • +
  • workerNodes
  • +
  • busy
  • +
  • full
  • +
  • info
  • +
  • maxSize
  • +
  • minSize
  • +
  • runTime
  • +
  • type
  • +
  • utilization
  • +
  • worker
  • +
  • afterTaskExecutionHook
  • +
  • afterWorkerSetup
  • +
  • beforeTaskExecutionHook
  • +
  • createAndSetupDynamicWorker
  • +
  • createAndSetupWorker
  • +
  • createWorker
  • +
  • destroy
  • +
  • destroyWorker
  • +
  • enableTasksQueue
  • +
  • execute
  • +
  • internalBusy
  • +
  • isMain
  • +
  • sendToWorker
  • +
  • setTasksQueueOptions
  • +
  • setWorkerChoiceStrategy
  • +
  • setWorkerChoiceStrategyOptions
  • +
  • setupHook
  • +
  • workerListener
  • +
  • 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