X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=docs%2Finterfaces%2FWorkerOptions.html;h=949c209e69b956d7dc86833e3977a1780228b233;hb=2a6631992868d900762f62e4c228dce4e4ee549a;hp=e22b94f4c5523a658f909fcbc358c155c5c0bf7f;hpb=d655c2c2b159a39f900230c14b301ba123653362;p=poolifier.git diff --git a/docs/interfaces/WorkerOptions.html b/docs/interfaces/WorkerOptions.html index e22b94f4..949c209e 100644 --- a/docs/interfaces/WorkerOptions.html +++ b/docs/interfaces/WorkerOptions.html @@ -1,4 +1,4 @@ -WorkerOptions | poolifier
+WorkerOptions | poolifier

Options for workers.

-
+
+

Hierarchy

  • WorkerOptions
+
  • Defined in src/worker/worker-options.ts:23
  • @@ -31,38 +32,42 @@

    Properties

    -
    - -
    async?: boolean
    +
    + +
    async?: boolean

    Whether your worker will perform asynchronous or not.

    +
    +
    +

    Default Value

    false

    -

    Default Value

    false

    +

    Deprecated

    This option will be removed in the next major version.

    -
    - -
    killBehavior?: "SOFT" | "HARD"
    +
  • Defined in src/worker/worker-options.ts:43
  • +
    + +
    killBehavior?: "SOFT" | "HARD"

    killBehavior dictates if your async unit (worker/process) will be deleted in case that a task is active on it.

      -
    • SOFT: If currentTime - lastActiveTime is greater than maxInactiveTime but a task is still running, then the worker won't be deleted.
    • -
    • HARD: If currentTime - lastActiveTime is greater than maxInactiveTime but a task is still running, then the worker will be deleted.
    • +
    • SOFT: If currentTime - lastActiveTime is greater than maxInactiveTime but a task is still executing or queued, then the worker won't be deleted.
    • +
    • HARD: If currentTime - lastActiveTime is greater than maxInactiveTime but a task is still executing or queued, then the worker will be deleted.

    This option only apply to the newly created workers.

    - -

    Default Value

    KillBehaviors.SOFT

    +
    +
    +

    Default Value

    KillBehaviors.SOFT

    -
    - -
    maxInactiveTime?: number
    +
  • Defined in src/worker/worker-options.ts:54
  • +
    + +
    maxInactiveTime?: number

    Maximum waiting time in milliseconds for tasks.

    After this time, newly created workers will be terminated. The last active time of your worker unit will be updated when a task is submitted to a worker or when a worker terminate a task.

    @@ -71,16 +76,17 @@ The last active time of your worker unit will be updated when a task is submitte when this timeout expires your tasks is interrupted and the worker is killed if is not part of the minimum size of the pool.
  • If killBehavior is set to KillBehaviors.SOFT your tasks have no timeout and your workers will not be terminated until your task is completed.
  • - -

    Default Value

    60000 ms

    +
    +
    +

    Default Value

    60000

    +
  • Defined in src/worker/worker-options.ts:36
  • -

    On This Page

    +

    On This Page

    +
  • async
  • +
  • killBehavior
  • +
  • maxInactiveTime
  • +
  • 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