Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main()
- {
- let mut count: i32 = 1024;
- let mut inc = ||{
- println!("count={}", count);
- //count += 1;
- };
- for i in 0..10 {
- std::thread::spawn(inc);
- }
- //println!("count={}", &mut count);
- //inc();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement