X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FDynamicClusterPool.html;h=718b9db67c9e3455f36c366464ac1a8418dd1131;hb=3bd6a82e43e11294af91bbd19647944ac740169e;hp=0a3eb0ca88824fe42e0c2f0a1aa4dfa15e355862;hpb=6709f3086622c12bae8060915be7a7f6be9d9763;p=poolifier.git diff --git a/docs/classes/DynamicClusterPool.html b/docs/classes/DynamicClusterPool.html index 0a3eb0ca..718b9db6 100644 --- a/docs/classes/DynamicClusterPool.html +++ b/docs/classes/DynamicClusterPool.html @@ -1,4 +1,4 @@ -DynamicClusterPool | poolifier
+DynamicClusterPool | poolifier

Returns void

-
+
  • Defined in src/pools/cluster/fixed.ts:69
  • +
    -
      - +
        +
      • Enables/disables the worker tasks queue in this pool.

        @@ -410,39 +410,41 @@ 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>

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

        @@ -453,31 +455,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/cluster/fixed.ts:64
  • +
    -
      - +
        +
      • Registers a listener callback on the given worker.

        @@ -485,37 +487,37 @@ Can be overridden.

        Type Parameters

        • -

          Message

    +

    Message

    Parameters

    • -
      worker: Worker
      +
      worker: Worker

      The worker which should register a listener.

    • -
      listener: ((message: MessageValue<Message, unknown>) => void)
      +
      listener: ((message) => void)

      The message listener callback.

    Returns void

    Returns void

    -
    +
  • Defined in src/pools/cluster/fixed.ts:80
  • +
    -
      - +
    -
    +
  • Defined in src/pools/cluster/fixed.ts:75
  • +
    -
    -
    +
  • Defined in src/pools/abstract-pool.ts:266
  • +
    -
      - +
        +
      • Sets the worker choice strategy in this pool.

        @@ -563,21 +565,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
  • +
    -
      - +
    -
    +
  • Defined in src/pools/cluster/fixed.ts:59
  • +
    -
      - +
        +
      • 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.

              @@ -627,11 +629,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
  • +
  • max
  • +
  • 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