2 // ignore-emscripten no threads support
4 use std::sync::mpsc::channel;
8 let (tx, rx) = channel::<&'static str>();
10 let t = thread::spawn(move|| {
11 assert_eq!(rx.recv().unwrap(), "hello, world");
14 tx.send("hello, world").unwrap();
15 t.join().ok().unwrap();