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