X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=ddd348eda95082deb9c6cbbee093e29d773977b7;hb=e604957d6ec7c137a3588de2ebbc9c83c0f634ba;hp=f37b4d1b4fb7c3dc6e10aea342584d527f6e56c2;hpb=200aca02adb41311beb654c24970049a50df5474;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index f37b4d1b..ddd348ed 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -6,7 +6,7 @@ poolifier +
  • The search index is not available
  • poolifier
    @@ -44,7 +44,7 @@ +
  • Defined in src/pools/thread/fixed.ts:29
  • @@ -58,37 +58,32 @@

    Properties

    Accessors

    Methods

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

    emitter?: PoolEmitter
    -
    -

    Inherit Doc

    +
  • Defined in src/pools/abstract-pool.ts:32
  • -
    filePath: string
    -
    - -
    nextMessageId: number = 0
    -

    Id of the next message.

    +
    filePath: string
    +

    Path to the worker-file.

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

    The promise map.

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

    The promise response 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 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.

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

    Worker choice strategy instance implementing the worker choice algorithm.

    -

    Default to a strategy implementing a round robin algorithm.

    +

    Worker choice strategy context referencing a worker choice algorithm implementation.

    +

    Default to a round robin algorithm.

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

    Inherit Doc

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

    Inherit Doc

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

    @@ -213,40 +198,51 @@
    -
    - -
    +
    + +
    +
    + +
    • get numberOfRunningTasks(): number
    • -
      -

      Inherit Doc

      +

      Number of tasks concurrently running in the pool.

      +

      Returns number

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

    -
    - +
    +
      - +
    • Hook executed after the worker task promise resolution. Can be overridden.

      @@ -255,24 +251,24 @@ Can be overridden.

      Parameters

      Returns void

    +
  • Defined in src/pools/abstract-pool.ts:278
  • -
    - +
  • Defined in src/pools/thread/fixed.ts:85
  • +
    +
      - +
    • Hook executed before the worker task promise resolution. Can be overridden.

      @@ -294,27 +290,27 @@ Can be overridden.

      Parameters

      Returns void

    +
  • Defined in src/pools/abstract-pool.ts:267
  • +
  • Defined in src/pools/abstract-pool.ts:307
  • +
  • Defined in src/pools/abstract-pool.ts:352
  • +
  • Defined in src/pools/thread/fixed.ts:78
    • -
      -

      Inherit Doc

      +

      {@inheritDoc}

      +

      Returns Promise<void>

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

      Inherit Doc

      +

      {@inheritDoc}

      +

      Parameters

    -
    - -
    -
    - -
    -
    - +
  • Defined in src/pools/abstract-pool.ts:217
  • +
    +
    -
    - -
    -
    - +
  • Defined in src/pools/abstract-pool.ts:210
  • +
    +
    -
    - -
      - +
    • Returns boolean

    +
  • Defined in src/pools/abstract-pool.ts:202
  • +
  • Defined in src/pools/thread/fixed.ts:49
  • +
  • Defined in src/pools/abstract-pool.ts:475
  • +
  • Defined in src/pools/thread/fixed.ts:62
    • - +
    • -
      -

      Inherit Doc

      +

      {@inheritDoc}

      +

      Parameters

      • -
        workerChoiceStrategy: "ROUND_ROBIN" | "LESS_RECENTLY_USED" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"
      +
      workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"

    Returns void

    +
  • Defined in src/pools/abstract-pool.ts:178
  • +
  • Defined in src/pools/abstract-pool.ts:252
  • +
  • Defined in src/pools/abstract-pool.ts:381