X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=f76448bb1447f1949c378be213edc3b6a37aaf6b;hb=fbc22127e53d3ec0ecbd38ecea25fb92ebef50e7;hp=dd1e0274985867ab81e34127c9711d09cca7ef2d;hpb=6047493a00c2852f2c7f4329def8e1322c678cf1;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index dd1e0274..f76448bb 100644 --- a/docs/classes/FixedThreadPool.html +++ b/docs/classes/FixedThreadPool.html @@ -1,4 +1,4 @@ -FixedThreadPool | poolifier
+FixedThreadPool | poolifier
-

Returns Promise<void>

+
-
    - +
      +
    • Enables/disables the worker tasks queue in this pool.

      @@ -400,74 +399,61 @@ Can be overridden.

      Parameters

      • -
        enable: boolean
        +
        enable: boolean

        Whether to enable or disable the worker tasks queue.

      • -
        Optional opts: TasksQueueOptions
+
Optional tasksQueueOptions: TasksQueueOptions
+

The worker tasks queue options.

+

Returns void

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

        Executes the function specified in the constructor with the task data parameter.

        +

        Executes the function specified in the worker constructor with the task data input parameter.

        -

        Returns

        Promise that will be resolved when the task is successfully completed.

        +

        Returns

        Promise that will be fulfilled when the task is completed.

        Parameters

        • -
          data: Data
          -

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

          +
          Optional data: Data
          +

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

        -

        Returns Promise<Response>

    -
    - -
      - -
    • -

      Finds a free worker node key based on the number of tasks the worker has applied.

      -

      If a worker is found with 0 running tasks, it is detected as free and its worker node key is returned.

      -

      If no free worker is found, -1 is returned.

      - -

      Returns

      A worker node key if there is one, -1 otherwise.

      -
      -

      Returns number

    -
    +
  • Defined in src/pools/abstract-pool.ts:307
  • +
    -
    -
    +
  • Defined in src/pools/abstract-pool.ts:298
  • +
    -
    -
    +
  • Defined in src/pools/thread/fixed.ts:49
  • +
    -
      - +
        +
      • Registers a listener callback on the given worker.

        @@ -475,37 +461,37 @@ Can be overridden.

        Type Parameters

        • -

          Message

    +

    Message

    Parameters

    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:266
  • +
    -
      - +
        +
      • Sets the worker choice strategy in this pool.

        @@ -553,17 +539,21 @@ Can be overridden.

        Parameters

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

          The worker choice strategy.

          +
        • +
        • +
          Optional workerChoiceStrategyOptions: WorkerChoiceStrategyOptions
          +

          The worker choice strategy options.

        Returns void

    -
    +
  • Defined in src/pools/abstract-pool.ts:218
  • +
    -
    -
    +
  • Defined in src/pools/abstract-pool.ts:244
  • +
    -
      - +
        +
      • Setup hook to execute code before worker node are created in the abstract constructor. Can be overridden

        @@ -589,21 +579,21 @@ Can be overridden

        Returns void

    -
    +
  • Defined in src/pools/abstract-pool.ts:360
  • +
    -
      - +
        +
      • This function is the listener registered for each worker message.

        Returns

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

        -

        Returns ((message: MessageValue<Response, unknown>) => void)

        +

        Returns ((message) => void)

        • -
            -
          • (message: MessageValue<Response, unknown>): void
          • +
              +
            • (message): void
            • This function is the listener registered for each worker message.

              @@ -613,11 +603,11 @@ Can be overridden

              Parameters

              +
              message: MessageValue<Response, unknown>

            Returns void

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

    Theme

    On This Page

    +
  • constructor
  • +
  • emitter
  • +
  • filePath
  • +
  • numberOfWorkers
  • +
  • opts
  • +
  • promiseResponseMap
  • +
  • workerChoiceStrategyContext
  • +
  • workerNodes
  • +
  • busy
  • +
  • full
  • +
  • numberOfQueuedTasks
  • +
  • numberOfRunningTasks
  • +
  • type
  • +
  • afterTaskExecutionHook
  • +
  • afterWorkerSetup
  • +
  • beforeTaskExecutionHook
  • +
  • chooseWorkerNode
  • +
  • createAndSetupWorker
  • +
  • createWorker
  • +
  • destroy
  • +
  • destroyWorker
  • +
  • enableTasksQueue
  • +
  • execute
  • +
  • internalBusy
  • +
  • isMain
  • +
  • registerWorkerMessageListener
  • +
  • sendToWorker
  • +
  • setTasksQueueOptions
  • +
  • setWorkerChoiceStrategy
  • +
  • setWorkerChoiceStrategyOptions
  • +
  • setupHook
  • +
  • workerListener
  • +
  • PoolType
  • +
  • AbstractPool
  • +
  • AbstractWorker
  • +
  • CircularArray
  • +
  • ClusterWorker
  • +
  • DynamicClusterPool
  • +
  • DynamicThreadPool
  • +
  • FixedClusterPool
  • +
  • FixedThreadPool
  • +
  • PoolEmitter
  • +
  • ThreadWorker
  • +
  • WorkerChoiceStrategyContext
  • +
  • ClusterPoolOptions
  • +
  • IPool
  • +
  • IWorker
  • +
  • IWorkerChoiceStrategy
  • +
  • MessageValue
  • +
  • PoolOptions
  • +
  • PromiseResponseWrapper
  • +
  • RequiredStatistics
  • +
  • Task
  • +
  • TasksQueueOptions
  • +
  • TasksUsage
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerNode
  • +
  • WorkerOptions
  • +
  • Draft
  • +
  • ErrorHandler
  • +
  • ExitHandler
  • +
  • KillBehavior
  • +
  • MessageHandler
  • +
  • OnlineHandler
  • +
  • PoolEvent
  • +
  • ThreadWorkerWithMessageChannel
  • +
  • WorkerAsyncFunction
  • +
  • WorkerChoiceStrategy
  • +
  • WorkerFunction
  • +
  • WorkerSyncFunction
  • +
  • KillBehaviors
  • +
  • PoolEvents
  • +
  • WorkerChoiceStrategies
  • Generated using TypeDoc

    \ No newline at end of file