Module cancel

Module cancel 

Source
Expand description

Cancellation support for long-running CLI and workflow operations.

The cancel helper installs a Ctrl+C handler once per process and exposes a lightweight check that higher layers can call before expensive work.

Structs§

CancellationError
Error returned when an operation is interrupted by cancellation.

Functions§

check
Return an error when the process has been cancelled.
init_handler
Install the process-wide Ctrl+C handler once.
is_cancelled
Return true when the process has observed cancellation.