send.rs 372 B

12345678910111213141516171819202122
  1. extern crate ralloc;
  2. use std::thread;
  3. #[test]
  4. fn test() {
  5. let mut join = Vec::new();
  6. for _ in 0..10000 {
  7. let bx: Box<u64> = Box::new(0x11FE15C001);
  8. join.push(thread::spawn(move || {
  9. assert_eq!(*bx, 0x11FE15C001);
  10. }));
  11. }
  12. for i in join {
  13. i.join().unwrap();
  14. }
  15. ralloc::lock().debug_assert_no_leak();
  16. }