Created
May 19, 2015 16:53
-
-
Save chrissharkey/9c2e940522f48bb3f922 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for l in 0..lines.len() { | |
let (data, tx) = (data.clone(), tx.clone()); | |
thread::spawn(move || { | |
let mut data = data.lock().unwrap(); | |
*data += 1; | |
println!("LINE: {}", lines[l].clone()); | |
tx.send(()); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment