X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=b8b8bed349e41aaa607df34c3d98a569d456164c;hb=310ec53bbcd0289d0d0f7d254f7d8fc38db05ad9;hp=88df603a1b681c329acd497c0f95c9f93ea4f611;hpb=f1583b4edd427f8c3f2b4ddc652d2e102390b08e;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index 88df603a..b8b8bed3 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,11 +1,13 @@ FixedThreadPool | poolifier
-
+
@@ -18,10 +20,6 @@

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

This pool selects the threads in a round robin fashion.

-

Template

of data sent to the worker. This can only be serializable data.

- -

Template

of response of execution. This can only be serializable data.

-

Author

Alessandro Pio Ardizio

Since

0.0.1

@@ -30,9 +28,13 @@

Type Parameters

  • -

    Data = unknown

  • +

    Data = unknown

    +

    Type of data sent to the worker. This can only be serializable data.

    +
  • -

    Response = unknown

+

Response = unknown

+

Type of response of execution. This can only be serializable data.

+

Hierarchy

+
  • Defined in src/pools/thread/fixed.ts:29
  • @@ -56,14 +58,11 @@

    Properties

    Accessors

    @@ -73,21 +72,16 @@

    Methods

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

    -
    emitter?: PoolEmitter
    -
    -

    Inherit Doc

    +
  • Defined in src/pools/abstract-pool.ts:32
  • -
    filePath: string
    -
    - -
    max?: number
    -
    -

    Inherit Doc

    -
    - -
    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>
    @@ -197,23 +181,15 @@
    +
  • 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

    @@ -221,40 +197,40 @@
    +
  • Defined in src/pools/thread/fixed.ts:100
  • +
  • Defined in src/pools/abstract-pool.ts:141
  • +
  • Defined in src/pools/thread/fixed.ts:95
  • Methods

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

      @@ -263,24 +239,24 @@ Can be overridden.

      Parameters

      Returns void

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

      @@ -302,27 +278,27 @@ Can be overridden.

      Parameters

      Returns void

    +
  • Defined in src/pools/abstract-pool.ts:242
  • +
  • Defined in src/pools/abstract-pool.ts:290
  • +
  • Defined in src/pools/abstract-pool.ts:335
  • +
  • Defined in src/pools/thread/fixed.ts:78
  • +
  • Defined in src/pools/abstract-pool.ts:208
  • +
  • Defined in src/pools/thread/fixed.ts:54
  • -
    - -
    -
    - -
    -
    - +
  • Defined in src/pools/abstract-pool.ts:193
  • +
    +
    -
    - -
    -
    - -
    -
    - -
    +
  • Defined in src/pools/abstract-pool.ts:185
  • +
  • Defined in src/pools/abstract-pool.ts:177
  • +
  • Defined in src/pools/thread/fixed.ts:49
  • +
  • Defined in src/pools/abstract-pool.ts:277
  • +
  • Defined in src/pools/thread/fixed.ts:62
  • Returns void

    +
  • Defined in src/pools/abstract-pool.ts:156
  • +
  • Defined in src/pools/abstract-pool.ts:227
  • +
  • Defined in src/pools/abstract-pool.ts:364