3 #![allow(non_camel_case_types)]
4 // ignore-emscripten no threads support
6 use std::sync::mpsc::{channel, Sender};
13 impl Drop for complainer {
15 println!("About to send!");
16 self.tx.send(true).unwrap();
21 fn complainer(tx: Sender<bool>) -> complainer {
28 fn f(tx: Sender<bool>) {
29 let _tx = complainer(tx);
34 let (tx, rx) = channel();
35 let t = thread::spawn(move|| f(tx.clone()));
36 println!("hiiiiiiiii");
37 assert!(rx.recv().unwrap());