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§
- hang_up
- Create receiver for
SIGHUPsignal. - interruption
- Create receiver for
SIGINTsignal. - interruption_
or_ termination - Create (single) receiver for
SIGINTandSIGTERMsignal. - signal
- Create (single) receiver for Unix process signals listed in
signals. - termination
- Create receiver for
SIGTERMsignal.