Skip to main content

should_stop

Function should_stop 

Source
pub fn should_stop() -> bool
Expand description

Returns true when any cooperative stop signal was observed (SIGINT or SIGTERM).

Use this in hot loops instead of duplicating is_cancelled() || is_terminated().

ยงExamples

use ssh_cli::signals::should_stop;

// Fresh process / test thread without a delivered signal.
assert!(!should_stop());