daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Feb 16th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use std::sync::{Arc, Mutex};
  2.  
  3. fn main() {
  4.     let m = Mutex::new(String::new());
  5.    
  6.     let l = Arc::new(m.lock().unwrap());
  7.    
  8.     std::thread::spawn(move || {
  9.         println!("{}", l.len());
  10.     });
  11.    
  12.     println!("Hello, world!");
  13. }
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