blob: b8324a8c43fb5386189f1c1dbcaba42e5b98e8a5 [file] [log] [blame]
//@ run-pass
//@ needs-threads
use std::sync::mpsc::channel;
use std::thread;
pub fn main() {
let (tx, rx) = channel::<&'static str>();
let t = thread::spawn(move|| {
assert_eq!(rx.recv().unwrap(), "hello, world");
});
tx.send("hello, world").unwrap();
t.join().ok().unwrap();
}