SHARE
TWEET

Untitled

a guest Mar 24th, 2019 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use core::sync::atomic::{self, AtomicUsize};
  2.  
  3. fn main() {
  4.     static A: AtomicUsize = AtomicUsize::new(4);
  5.     static B: AtomicUsize = AtomicUsize::new(4);
  6.    
  7.     A.store(5, atomic::Ordering::SeqCst);
  8.    
  9.     println!("{}", A.load(atomic::Ordering::SeqCst));
  10.     println!("{}", B.load(atomic::Ordering::SeqCst));
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top