Guest User

Untitled

a guest
Apr 26th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. use std::sync::Mutex;
  2.  
  3. fn main() {
  4. let m = Mutex::new(5);
  5.  
  6. {
  7. let mut num = m.lock().unwrap();
  8. *num = 6;
  9. }
  10.  
  11. println!("m = {:?}", m);
  12. }
Add Comment
Please, Sign In to add comment