Expand description
Operating system signal handling.
Registers a Ctrl+C (SIGINT) handler that signals cancellation
via a shared AtomicBool. All modules that run
long operations must check is_cancelled periodically.
Functionsยง
- cancellation_
flag - Returns the shared cancellation flag pointer.
- is_
cancelled - Returns
trueif the user pressed Ctrl+C. - is_
terminated - Returns
trueif the process received SIGTERM. - register_
handler - Registers the Ctrl+C handler that sets the cancellation flag.
- sigterm_
flag - Returns the Arc of the SIGTERM flag for async tasks.