X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FClusterWorker.html;h=6bc8cd9827ef81dedd614dac071885e2826b12d7;hb=2a6631992868d900762f62e4c228dce4e4ee549a;hp=5520d20b3ebeb9196b27ace3b84bf21646b28cc7;hpb=a2742ce794032ee57b3ec1203c500b1aecca34f0;p=poolifier.git diff --git a/docs/classes/ClusterWorker.html b/docs/classes/ClusterWorker.html index 5520d20b..6bc8cd98 100644 --- a/docs/classes/ClusterWorker.html +++ b/docs/classes/ClusterWorker.html @@ -21,22 +21,25 @@ it will send a termination request to its main worker.

If you use a DynamicClusterPool the extra workers that were created will be terminated, but the minimum number of workers will be guaranteed.

+ +
+

Author

Christopher Quadflieg

-

Author

Christopher Quadflieg

- -

Since

2.0.0

+

Since

2.0.0

Type Parameters

+

Type of response the worker sends back to the main worker. This can only be structured-cloneable data.

+
+

Hierarchy

+
  • Defined in src/worker/cluster-worker.ts:21
  • @@ -52,39 +55,44 @@ but the minimum number of workers will be guaranteed.

    Constructors

    - + -

    Returns ClusterWorker<Data, Response>

    +
  • Defined in src/worker/cluster-worker.ts:31
  • Properties

    - +
    aliveInterval?: Timeout

    Handler id of the aliveInterval worker alive check.

    -
    +
  • Defined in src/worker/abstract-worker.ts:58
  • - +
    isMain: boolean

    Whether this is the main worker or not.

    -
    +
  • Defined in src/worker/abstract-worker.ts:70
  • - +
    lastTaskTimestamp: number

    Timestamp of the last task processed by this worker.

    -
    +
  • Defined in src/worker/abstract-worker.ts:50
  • - -
    mainWorker: undefined | null | Worker
    + +
    mainWorker: Worker

    Reference to main worker.

    -
    +
  • Defined in src/worker/abstract-worker.ts:74
  • - +
    opts: WorkerOptions = ...

    Options for the worker.

    -
    +
  • Defined in src/worker/abstract-worker.ts:75
  • +
    + +
    statistics: WorkerStatistics
    +

    Performance statistics computation requirements.

    +
    +
    - +
    taskFunctions: Map<string, WorkerFunction<Data, Response>>

    Task function(s) processed by the worker when the pool's execution function is invoked.

    -
    +
  • Defined in src/worker/abstract-worker.ts:46
  • +
    +

    Accessors

    +
    + +

    Methods

    - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.3.3/node_modules/@types/node/async_hooks.d.ts:306
  • - + -

    Returns Func

    +
  • Defined in node_modules/.pnpm/@types+node@20.3.3/node_modules/@types/node/async_hooks.d.ts:283
  • - +
    +
  • Defined in src/worker/abstract-worker.ts:196
  • - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.3.3/node_modules/@types/node/async_hooks.d.ts:302
  • - +
    -
    - -
    +
    + + -

    Returns string

    Message of the error.

    -
    +
  • Defined in src/worker/abstract-worker.ts:211
  • - + +

    Returns void

    +
    +
  • Defined in src/worker/abstract-worker.ts:153
  • - + -

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:256
  • - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.3.3/node_modules/@types/node/async_hooks.d.ts:294
  • - + -

    Returns void

    +
  • Defined in src/worker/abstract-worker.ts:221
  • - + +

    Returns void

    +
    +
  • Defined in src/worker/cluster-worker.ts:52
  • - +
    +
  • Defined in node_modules/.pnpm/@types+node@20.3.3/node_modules/@types/node/async_hooks.d.ts:311
  • - + -

    Returns Func

    +
  • Defined in node_modules/.pnpm/@types+node@20.3.3/node_modules/@types/node/async_hooks.d.ts:277
  • +
  • constructor
  • +
  • aliveInterval
  • +
  • isMain
  • +
  • lastTaskTimestamp
  • +
  • mainWorker
  • +
  • opts
  • +
  • statistics
  • +
  • taskFunctions
  • +
  • id
  • +
  • asyncId
  • +
  • bind
  • +
  • checkAlive
  • +
  • emitDestroy
  • +
  • getMainWorker
  • +
  • handleError
  • +
  • messageListener
  • +
  • runAsync
  • +
  • runInAsyncScope
  • +
  • runSync
  • +
  • sendToMainWorker
  • +
  • triggerAsyncId
  • +
  • bind
  • +
  • AbstractPool
  • +
  • AbstractWorker
  • +
  • CircularArray
  • +
  • ClusterWorker
  • +
  • DynamicClusterPool
  • +
  • DynamicThreadPool
  • +
  • FixedClusterPool
  • +
  • FixedThreadPool
  • +
  • PoolEmitter
  • +
  • Queue
  • +
  • ThreadWorker
  • +
  • WorkerChoiceStrategyContext
  • +
  • ClusterPoolOptions
  • +
  • EventLoopUtilizationMeasurementStatistics
  • +
  • IPool
  • +
  • IWorker
  • +
  • IWorkerChoiceStrategy
  • +
  • MeasurementOptions
  • +
  • MeasurementStatistics
  • +
  • MeasurementStatisticsRequirements
  • +
  • MessageValue
  • +
  • PoolInfo
  • +
  • PoolOptions
  • +
  • PromiseResponseWrapper
  • +
  • StrategyPolicy
  • +
  • Task
  • +
  • TaskError
  • +
  • TaskPerformance
  • +
  • TaskStatistics
  • +
  • TaskStatisticsRequirements
  • +
  • TasksQueueOptions
  • +
  • ThreadPoolOptions
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerInfo
  • +
  • WorkerNode
  • +
  • WorkerOptions
  • +
  • WorkerStatistics
  • +
  • WorkerUsage
  • +
  • ErrorHandler
  • +
  • ExitHandler
  • +
  • KillBehavior
  • +
  • Measurement
  • +
  • MessageHandler
  • +
  • OnlineHandler
  • +
  • PoolEvent
  • +
  • PoolType
  • +
  • TaskFunctions
  • +
  • WorkerAsyncFunction
  • +
  • WorkerChoiceStrategy
  • +
  • WorkerFunction
  • +
  • WorkerSyncFunction
  • +
  • WorkerType
  • +
  • KillBehaviors
  • +
  • Measurements
  • +
  • PoolEvents
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • +
  • availableParallelism
  • Generated using TypeDoc

    \ No newline at end of file