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§