X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicThreadPool.html;h=39b8dfba2aa8c5b38c60e7314b1670e02e4ae9d0;hb=ccb7d1a70cd9bd4eb050160517e5bc48311d014f;hp=ae040b5bac053f4e71861c20b2c062425c9de990;hpb=3bd6a82e43e11294af91bbd19647944ac740169e;p=poolifier.git diff --git a/docs/classes/DynamicThreadPool.html b/docs/classes/DynamicThreadPool.html index ae040b5b..39b8dfba 100644 --- a/docs/classes/DynamicThreadPool.html +++ b/docs/classes/DynamicThreadPool.html @@ -24,9 +24,9 @@ When the maximum number of threads is reached and workers are busy, an event is

Since

0.0.1

-
+

Type Parameters

-

Properties

-
emitter?: PoolEmitter
+
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:44
  • -
    filePath: string
    +
    filePath: string

    Path to the worker file.

    +
  • Defined in src/pools/abstract-pool.ts:79
  • -
    max: number
    +
    max: number

    Maximum number of threads that can be created by this pool.

    +
  • Defined in src/pools/thread/dynamic.ts:31
  • -
    numberOfWorkers: number
    +
    numberOfWorkers: number

    Number of workers that this pool should manage.

    +
  • Defined in src/pools/abstract-pool.ts:78
  • -
    opts: PoolOptions<ThreadWorkerWithMessageChannel>
    +
    opts: PoolOptions<ThreadWorkerWithMessageChannel>

    Options for the pool.

    +
  • Defined in src/pools/abstract-pool.ts:80
  • -
    promiseResponseMap: Map<string, PromiseResponseWrapper<ThreadWorkerWithMessageChannel, Response>> = ...
    +
    promiseResponseMap: Map<string, PromiseResponseWrapper<ThreadWorkerWithMessageChannel, Response>> = ...

    The execution response promise map.

    +
  • Defined in src/pools/abstract-pool.ts:54
  • -
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<ThreadWorkerWithMessageChannel, Data, Response>
    +
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<ThreadWorkerWithMessageChannel, 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:64
  • -
    workerNodes: WorkerNode<ThreadWorkerWithMessageChannel, Data>[] = []
    +
    workerNodes: WorkerNode<ThreadWorkerWithMessageChannel, Data>[] = []

    Pool worker nodes.

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

    @@ -222,7 +224,7 @@ When the maximum number of threads is reached and workers are busy, an event is

    Returns boolean

    +
  • Defined in src/pools/thread/dynamic.ts:54
  • +
  • Defined in src/pools/thread/dynamic.ts:44
  • +
  • Defined in src/pools/abstract-pool.ts:230
  • +
  • Defined in src/pools/abstract-pool.ts:220
  • +
    + +
    +
  • Defined in src/pools/thread/dynamic.ts:39
  • Methods

    +
  • Defined in src/pools/abstract-pool.ts:430
  • +
  • Defined in src/pools/thread/fixed.ts:85
  • +
  • Defined in src/pools/abstract-pool.ts:419
  • +
  • Defined in src/pools/abstract-pool.ts:498
  • +
  • Defined in src/pools/abstract-pool.ts:561
  • +
  • Defined in src/pools/thread/fixed.ts:78
  • +
  • Defined in src/pools/abstract-pool.ts:382
  • +
  • Defined in src/pools/thread/fixed.ts:54
  • Returns void

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

    Returns Promise<Response>

    -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:347
  • +
  • Defined in src/pools/abstract-pool.ts:338
  • +
  • Defined in src/pools/thread/fixed.ts:49
  • Returns void

    Returns void

    +
  • Defined in src/pools/thread/fixed.ts:70
  • +
  • Defined in src/pools/thread/fixed.ts:62
  • +
  • Defined in src/pools/abstract-pool.ts:306
  • +
  • Defined in src/pools/abstract-pool.ts:253
  • +
  • Defined in src/pools/abstract-pool.ts:283
  • +
  • Defined in src/pools/abstract-pool.ts:404
  • +

    Returns void

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

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