Logo ProcessKit API Reference

ProcessGroupOptions Type

Options applied when creating a `ProcessGroup`: the graceful-shutdown window and whole-tree resource limits.

Constructors

Constructor Description

ProcessGroupOptions()

Full Usage: ProcessGroupOptions()

Returns: ProcessGroupOptions

The defaults: a 2-second shutdown grace, no limits.

Returns: ProcessGroupOptions

Instance members

Instance member Description

this.Limits

Full Usage: this.Limits

Returns: ResourceLimits

The whole-tree resource caps applied at creation.

Returns: ResourceLimits

this.ShutdownTimeout

Full Usage: this.ShutdownTimeout

Returns: TimeSpan

How long `ShutdownAsync` waits after SIGTERM before escalating to SIGKILL (Unix; default 2s).

Returns: TimeSpan

this.WithCpuQuota

Full Usage: this.WithCpuQuota

Parameters:
    cores : float

Returns: ProcessGroupOptions

A copy capping the tree's CPU at `cores` cores' worth.

cores : float
Returns: ProcessGroupOptions

this.WithMaxProcesses

Full Usage: this.WithMaxProcesses

Parameters:
    count : int

Returns: ProcessGroupOptions

A copy capping the number of live processes in the tree at `count`.

count : int
Returns: ProcessGroupOptions

this.WithMemoryMax

Full Usage: this.WithMemoryMax

Parameters:
    bytes : int64

Returns: ProcessGroupOptions

A copy capping the tree's total memory at `bytes`.

bytes : int64
Returns: ProcessGroupOptions

this.WithShutdownTimeout

Full Usage: this.WithShutdownTimeout

Parameters:
Returns: ProcessGroupOptions

A copy with the shutdown grace window set. A negative `timeout` is rejected (`ArgumentOutOfRangeException`); `TimeSpan.Zero` is valid (no grace — escalate immediately).

timeout : TimeSpan
Returns: ProcessGroupOptions

Type something to start searching.