2 #![allow(non_camel_case_types)]
4 // ignore-emscripten no threads support
7 Make sure we can spawn tasks that take different types of
8 parameters. This is based on a test case for #520 provided by Rob
13 use std::sync::mpsc::{channel, Sender};
15 type ctx = Sender<isize>;
17 fn iotask(_tx: &ctx, ip: String) {
18 assert_eq!(ip, "localhost".to_string());
22 let (tx, _rx) = channel::<isize>();
23 let t = thread::spawn(move|| iotask(&tx, "localhost".to_string()) );
24 t.join().ok().unwrap();