ProcessGroupOptions Type
Options applied when creating a `ProcessGroup`: the graceful-shutdown window and whole-tree resource limits.
Constructors
| Constructor |
Description
|
|
The defaults: a 2-second shutdown grace, `Signal.Term`, and no limits.
|
Instance members
| Instance member |
Description
|
|
The whole-tree resource caps applied at creation.
|
|
How long `ShutdownAsync` waits after the configured `StopSignal` before escalating (default 2s).
|
|
The soft signal sent by `ShutdownAsync` before hard-kill escalation (default `Signal.Term`).
|
|
A copy pinning the tree to `cores` — the CPU cores its processes may be scheduled on (the Windows Job Object affinity mask, the Linux cgroup v2 `cpuset.cpus`). Needs a limit-capable mechanism: elsewhere `ProcessGroup.Create` fails with `ProcessError.ResourceLimit` rather than silently running the tree on every core. See `ResourceLimits.WithCpuAffinity`.
|
|
|
|
A copy capping CPU time for each spawned run (or the whole Job on Windows).
|
Full Usage:
this.WithIoMax
Parameters:
string
readBytesPerSecond : int64
writeBytesPerSecond : int64
readOperationsPerSecond : int64
writeOperationsPerSecond : int64
Returns: ProcessGroupOptions
|
Convenience overload using zero as the unbounded sentinel; see `ResourceLimits.WithIoMax`.
|
Full Usage:
this.WithIoMax
Parameters:
string
readBytesPerSecond : int64 option
writeBytesPerSecond : int64 option
readOperationsPerSecond : int64 option
writeOperationsPerSecond : int64 option
Returns: ProcessGroupOptions
|
A copy applying directional disk I/O ceilings to one explicit Linux device or Windows volume; see `ResourceLimits.WithIoMax` for target syntax and platform semantics.
|
|
A copy capping the number of live processes in the tree at `count`.
|
|
|
|
A copy enabling cgroup v2 whole-tree OOM kills. Linux cgroup v2-only; creation is refused with `ProcessError.Unsupported` on mechanisms that cannot provide this semantic.
|
|
A copy with the shutdown grace window set. A negative `timeout` is rejected (`ArgumentOutOfRangeException`); `TimeSpan.Zero` is valid (no grace — escalate immediately).
|
|
A copy using `signal` for graceful shutdown before escalation.
|
Full Usage:
this.WithUiRestrictions
Parameters:
WindowsUiRestrictions
Returns: ProcessGroupOptions
|
A copy imposing the given Windows Job Object UI restrictions on the tree (clipboard, desktop, display/system settings, exit-Windows — see `WindowsUiRestrictions`). Windows-only: off Windows `ProcessGroup.Create` fails with `ProcessError.Unsupported` rather than silently running the tree unrestricted. See `ResourceLimits.WithUiRestrictions`.
|
ProcessKit API Reference