Crate interruptor
source · [−]Expand description
Collection of functions generating Unix process signal receivers for use in the crossbeam_channel::select! macro.
Example
let tick = tick(Duration::from_secs(1));
let stop = interruption_or_termination();
loop {
select! {
recv(tick) -> _ => println!("Running!"),
recv(stop) -> _ => break,
}
}
Enums
Functions
Create receiver for SIGHUP
signal.
Create receiver for SIGINT
signal.
Create (single) receiver for SIGINT
and SIGTERM
signal.
Create (single) receiver for Unix process signals listed in signals
.
Create receiver for SIGTERM
signal.