2 #![allow(unused_must_use)]
3 // ignore-emscripten no threads support
6 use std::sync::mpsc::{channel, Sender};
8 pub fn main() { test05(); }
10 fn test05_start(tx : &Sender<isize>) {
20 let (tx, rx) = channel();
21 let t = thread::spawn(move|| { test05_start(&tx) });
22 let mut value: isize = rx.recv().unwrap();
23 println!("{}", value);
24 value = rx.recv().unwrap();
25 println!("{}", value);
26 value = rx.recv().unwrap();
27 println!("{}", value);
28 assert_eq!(value, 30);