Creates an instance of ProcessTimeoutPolicy using the specified timeout threshold and an optional cancellation mode.
public static ProcessTimeoutPolicy FromTimeSpan(TimeSpan timeoutThreshold, ProcessExitBehaviour exitBehaviour = ProcessExitBehaviour.GracefulExit)
The maximum duration to wait before the process is considered timed out.
The method of cancellation to apply when the timeout threshold is reached. Defaults to GracefulExit.
If exitBehaviour is
GracefulExit, the graceful interrupt is
best-effort on Windows — a console-host caller typically cannot attach to the
child's console, no signal is delivered, and the child is force-terminated;
on Unix, SIGTERM is delivered and the exit is genuinely graceful.