chan 0.1.23

DEPRECATED. Use crossbeam-channel instead.
Documentation
#[macro_use]
extern crate chan;

use std::thread;
use std::time::Duration;

fn main() {
    let tick = chan::tick_ms(100);
    let boom = chan::after_ms(500);
    loop {
        chan_select! {
            default => {
                println!("   .");
                thread::sleep(Duration::from_millis(50));
            },
            tick.recv() => println!("tick."),
            boom.recv() => { println!("BOOM!"); return; },
        }
    }
}