X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=d5a908208d680581c9e583711f2fbdba1aa39768;hb=e1d3eccbb484bfbe36f6dcb9c4ef22a11621a00b;hp=0498d0bee1ab114b1f7a2e65b4390afd3d1f9943;hpb=b08b5fc507f21848c9435380edb7d155e92eaaf5;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index 0498d0be..d5a90820 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,4 +1,4 @@ -FixedThreadPool | poolifier
+FixedThreadPool | poolifier
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier
    -
    + @@ -102,7 +100,7 @@
    -

    Returns FixedThreadPool<Data, Response>

    Properties

    emitter?: PoolEmitter
    -
    -

    Inherit Doc

    +
  • 'full': Emitted when the pool is dynamic and full.
  • +
  • 'busy': Emitted when the pool is busy.
  • + +
    -
    filePath: string
    -
    - -
    nextMessageId: number = 0
    -

    Id of the next message.

    +
    filePath: string
    +

    Path to the worker file.

    +
  • Defined in src/pools/abstract-pool.ts:77
  • -
    numberOfWorkers: number
    +
  • Defined in src/pools/abstract-pool.ts:76
  • -
    -
    - -
    promiseMap: Map<number, PromiseWorkerResponseWrapper<ThreadWorkerWithMessageChannel, Response>> = ...
    -

    The promise map.

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

    The execution response promise map.

      -
    • key: This is the message Id of each submitted task.
    • -
    • value: An object that contains the worker, the resolve function and the reject function.
    • +
    • key: The message id of each submitted task.
    • +
    • value: An object that contains the worker, the execution response promise resolve and reject callbacks.
    -

    When we receive a message from the worker we get a map entry and resolve/reject the promise based on the message.

    +

    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:52
  • -
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<ThreadWorkerWithMessageChannel, Data, Response>
    -

    Worker choice strategy instance implementing the worker choice algorithm.

    -

    Default to a strategy implementing a round robin algorithm.

    +
    workerChoiceStrategyContext: WorkerChoiceStrategyContext<ThreadWorkerWithMessageChannel, Data, Response>
    +

    Worker choice strategy context referencing a worker choice algorithm implementation.

    +

    Default to a round robin algorithm.

    +
    +
    + +
    workerNodes: WorkerNode<ThreadWorkerWithMessageChannel, Data>[] = []
    +

    Pool worker nodes.

    -
    - - -
    -

    Inherit Doc

    -
    - -
    workersTasksUsage: Map<ThreadWorkerWithMessageChannel, TasksUsage> = ...
    -
    -

    Inherit Doc

    +

    Inherited from AbstractPool.workerNodes

    +

    Accessors

    -
    - -
    +
    + +
      +
    • get full(): boolean
    • +
    • +

      Whether the pool is full or not.

      +

      The pool filling boolean status.

      +
      +

      Returns boolean

    +
    + +
      +
    • get numberOfQueuedTasks(): number
    • +
    • +

      Number of tasks queued in the pool.

      +
      +

      Returns number

    +
    + +
    • get numberOfRunningTasks(): number
    • -
      -

      Inherit Doc

      +

      Number of tasks running in the pool.

      +

      Returns number

    +
  • Defined in src/pools/abstract-pool.ts:185
  • +
  • Defined in src/pools/thread/fixed.ts:95
  • Methods

    -
    - +
    +
    +
  • Defined in src/pools/abstract-pool.ts:391
  • Returns void

    -
    - +
  • Defined in src/pools/thread/fixed.ts:85
  • +
    +
    -
    - +
  • Defined in src/pools/abstract-pool.ts:380
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:424
  • +
  • Defined in src/pools/abstract-pool.ts:486
  • +
  • Defined in src/pools/thread/fixed.ts:78
  • -
    - -
    +
    + +

    Returns Promise<void>

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

    Returns void

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

    Returns Promise<Response>

    -
    - +
  • Defined in src/pools/abstract-pool.ts:312
  • +
    +
    -
    - -
    -
    - +
  • Defined in src/pools/abstract-pool.ts:305
  • +
    +
    +
  • Defined in src/pools/abstract-pool.ts:300
  • -
    - -
    +
    + +
    -
    - -
    +
    + +
    -
    - -
    +
    + +

    Returns void

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

    Returns void

    +
    + +
    +
  • Defined in src/pools/abstract-pool.ts:244
  • +
  • Defined in src/pools/abstract-pool.ts:365
  • - +
    +
    -
    +
  • constructor
  • +
  • emitter
  • +
  • filePath
  • +
  • numberOfWorkers
  • +
  • opts
  • +
  • promiseResponseMap
  • +
  • workerChoiceStrategyContext
  • +
  • workerNodes
  • +
  • busy
  • +
  • full
  • +
  • numberOfQueuedTasks
  • +
  • numberOfRunningTasks
  • +
  • type
  • +
  • afterTaskExecutionHook
  • +
  • afterWorkerSetup
  • +
  • beforeTaskExecutionHook
  • +
  • chooseWorkerNode
  • +
  • createAndSetupWorker
  • +
  • createWorker
  • +
  • destroy
  • +
  • destroyWorker
  • +
  • enableTasksQueue
  • +
  • execute
  • +
  • findFreeWorkerNodeKey
  • +
  • internalBusy
  • +
  • isMain
  • +
  • registerWorkerMessageListener
  • +
  • sendToWorker
  • +
  • setTasksQueueOptions
  • +
  • setWorkerChoiceStrategy
  • +
  • setWorkerChoiceStrategyOptions
  • +
  • setupHook
  • +
  • workerListener
  • + +

    Generated using TypeDoc

    -
    \ No newline at end of file +
    \ No newline at end of file