X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FFixedThreadPool.html;h=357fe5d09f1c8bdf75a698044475f0895602248e;hb=3bd6a82e43e11294af91bbd19647944ac740169e;hp=1a0098ffadfacbab78e6c1cffc8d694d0221ba64;hpb=2f4ae5a6c14efa15bafa4ab0e68f166ec80d719b;p=poolifier.git diff --git a/docs/classes/FixedThreadPool.html b/docs/classes/FixedThreadPool.html index 1a0098ff..357fe5d0 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,21 +400,21 @@ Can be overridden.

      Parameters

      • -
        enable: boolean
        +
        enable: boolean

        Whether to enable or disable the worker tasks queue.

      • -
        Optional tasksQueueOptions: 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 worker constructor with the task data input parameter.

        @@ -424,17 +424,17 @@ Can be overridden.

        Parameters

        • -
          Optional data: Data
          +
          Optional data: Data

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

        -

        Returns Promise<Response>

    -
    +
  • Defined in src/pools/abstract-pool.ts:310
  • +
    -
      - +
        +
      • 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.

        @@ -445,31 +445,31 @@ Can be overridden.

        Returns number

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

        @@ -477,37 +477,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.

        @@ -555,21 +555,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
          +
          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

        @@ -595,21 +595,21 @@ Can be overridden

        Returns void

    -
    +
  • Defined in src/pools/abstract-pool.ts:363
  • +
    -
      - +
        +
      • 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.

              @@ -619,11 +619,11 @@ Can be overridden

              Parameters

              +
              message: MessageValue<Response, unknown>

            Returns void

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

    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
  • +
  • findFreeWorkerNodeKey
  • +
  • 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