X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=docs%2Finterfaces%2FIPool.html;h=61d1b615339d614f5a4bdc682e20f12d7041e67f;hb=ec06e4dd01adf7aa4bab470c59da42c19d863d0b;hp=c7fe36db8141f5140f5e252b6f3fed5e2eb08794;hpb=200aca02adb41311beb654c24970049a50df5474;p=poolifier.git diff --git a/docs/interfaces/IPool.html b/docs/interfaces/IPool.html index c7fe36db..61d1b615 100644 --- a/docs/interfaces/IPool.html +++ b/docs/interfaces/IPool.html @@ -1,4 +1,4 @@ -IPool | poolifier
+IPool | poolifier
  • Preparing search index...
  • -
  • The search index is not available
poolifier
+
  • The search index is not available
  • poolifier
    -
    +
    @@ -42,43 +42,49 @@

    Properties

    +
    + +
    destroy: (() => Promise<void>)
    +
    +

    Type declaration

    +
      +
    • +
        +
      • (): Promise<void>
      • +
      • +

        Shutdowns every current worker in this pool.

        +
        +

        Returns Promise<void>

    - +
    emitter?: PoolEmitter

    Emitter on which events can be listened to.

    Events that can currently be listened to:

      -
    • 'busy'
    • +
    • 'full': Emitted when the pool is dynamic and full.
    • +
    • 'busy': Emitted when the pool is busy.
    -
    -

    Methods

    -
    - -
      - -
    • -

      Shutdowns every current worker in this pool.

      -
      -

      Returns Promise<void>

    -
    +
  • Defined in src/pools/pool.ts:109
  • +
    -
      - +
      execute: ((data: Data) => Promise<Response>)
      +
      +

      Type declaration

      +
        +
      • +
          +
        • (data: Data): Promise<Response>
        • Performs the task specified in the constructor with the data parameter.

          @@ -88,16 +94,21 @@

          Parameters

          • -
            data: Data
            +
            data: Data

            The input for the specified task. This can only be serializable data.

          -

          Returns Promise<Response>

    -
    +
  • Defined in src/pools/pool.ts:116
  • +
    -
      - +
      setWorkerChoiceStrategy: ((workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN") => void)
      +
      +

      Type declaration

      +
        +
      • +
          +
        • (workerChoiceStrategy: "ROUND_ROBIN" | "LESS_USED" | "LESS_BUSY" | "FAIR_SHARE" | "WEIGHTED_ROUND_ROBIN"): void
        • Sets the worker choice strategy in this pool.

          @@ -105,16 +116,17 @@

          Parameters

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

            The worker choice strategy.

      -

      Returns void

    - +
    +
    -
    +
    +

    Generated using TypeDoc

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