X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Fclasses%2FClusterWorker.html;h=6aa60182b1f58d24081995d6f2a4571a4709a246;hb=058a94577c79d9b62bf54516ea27e0e70f934fcc;hp=d64bf4da414b31272105f2c5108ff5ad43bffb93;hpb=2c94c3a5da9d6b4a0ac992386907d8a406ee38f7;p=poolifier.git diff --git a/docs/classes/ClusterWorker.html b/docs/classes/ClusterWorker.html index d64bf4da..6aa60182 100644 --- a/docs/classes/ClusterWorker.html +++ b/docs/classes/ClusterWorker.html @@ -21,10 +21,11 @@ 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

@@ -32,11 +33,13 @@ but the minimum number of workers will be guaranteed.

  • Data = unknown

    Type of data this worker receives from pool's execution. This can only be serializable data.

    -
  • + +
  • Response = unknown

    Type of response the worker sends back to the main worker. This can only be serializable data.

    -
  • + +

    Hierarchy

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

    Constructors

    - + -

    Returns ClusterWorker<Data, Response>

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

    - +
    aliveInterval?: Timeout

    Handler id of the aliveInterval worker alive check.

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

    Whether this is the main worker or not.

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

    Timestamp of the last task processed by this worker.

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

    Reference to main worker.

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

    Options for the worker.

    -
    +
  • Defined in src/worker/abstract-worker.ts:62
  • - +
    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:37
  • Methods

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

    Returns Func

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

    Returns string

    Message of the error.

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

    Returns void

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

    Returns void

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

    Returns void

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

    Returns void

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

    Returns Func

    +
  • Defined in node_modules/.pnpm/@types+node@20.2.5/node_modules/@types/node/async_hooks.d.ts:277
  • +
  • constructor
  • +
  • aliveInterval
  • +
  • isMain
  • +
  • lastTaskTimestamp
  • +
  • mainWorker
  • +
  • opts
  • +
  • taskFunctions
  • +
  • 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
  • +
  • IPool
  • +
  • IWorker
  • +
  • IWorkerChoiceStrategy
  • +
  • MessageValue
  • +
  • PoolInfo
  • +
  • PoolOptions
  • +
  • PromiseResponseWrapper
  • +
  • RequiredStatistics
  • +
  • Task
  • +
  • TasksQueueOptions
  • +
  • TasksUsage
  • +
  • WorkerChoiceStrategyOptions
  • +
  • WorkerNode
  • +
  • WorkerOptions
  • +
  • Draft
  • +
  • ErrorHandler
  • +
  • ExitHandler
  • +
  • KillBehavior
  • +
  • MessageHandler
  • +
  • OnlineHandler
  • +
  • PoolEvent
  • +
  • PoolType
  • +
  • TaskFunctions
  • +
  • ThreadWorkerWithMessageChannel
  • +
  • WorkerAsyncFunction
  • +
  • WorkerChoiceStrategy
  • +
  • WorkerFunction
  • +
  • WorkerSyncFunction
  • +
  • WorkerType
  • +
  • KillBehaviors
  • +
  • PoolEvents
  • +
  • PoolTypes
  • +
  • WorkerChoiceStrategies
  • +
  • WorkerTypes
  • Generated using TypeDoc

    \ No newline at end of file