1 #![allow(non_camel_case_types)]
2 // ignore-emscripten no threads support
4 use std::sync::mpsc::{channel, Sender};
11 impl Drop for complainer {
13 println!("About to send!");
14 self.tx.send(true).unwrap();
19 fn complainer(tx: Sender<bool>) -> complainer {
26 fn f(tx: Sender<bool>) {
27 let _tx = complainer(tx);
32 let (tx, rx) = channel();
33 let t = thread::spawn(move|| f(tx.clone()));
34 println!("hiiiiiiiii");
35 assert!(rx.recv().unwrap());