3 #![allow(unused_variables)]
4 #![allow(stable_features)]
8 // ignore-emscripten no threads support
10 use std
::sync
::atomic
::{AtomicUsize, Ordering}
;
14 static A
: AtomicUsize
= AtomicUsize
::new(0);
17 panic
::set_hook(Box
::new(|_
| ()));
18 panic
::set_hook(Box
::new(|info
| { A.fetch_add(1, Ordering::SeqCst); }
));
20 let _
= thread
::spawn(|| {
24 assert_eq
!(1, A
.load(Ordering
::SeqCst
));