xref: /relibc/ralloc/tests/join.rs (revision 14e275d8145880b7dca823efefc27a47a3d6e9ef)
1 extern crate ralloc;
2 
3 #[global_allocator]
4 static ALLOCATOR: ralloc::Allocator = ralloc::Allocator;
5 
6 mod util;
7 
8 use std::thread;
9 
10 #[test]
11 #[ignore]
12 fn join_thread() {
13     util::multiply(|| {
14         for i in 0..0xFFF {
15             let bx = Box::new("frakkkko");
16             let join = thread::spawn(move || Box::new(!i));
17             drop(bx);
18 
19             util::acid(move || {
20                 let bx = Box::new("frakkkko");
21                 join.join().unwrap();
22                 drop(bx);
23             });
24         }
25     });
26 }
27