Skip to content

Instantly share code, notes, and snippets.

@c16a
Last active June 25, 2018 17:57
Show Gist options
  • Save c16a/c633aef57354d2ba49b3c3bb3b24390f to your computer and use it in GitHub Desktop.
Save c16a/c633aef57354d2ba49b3c3bb3b24390f to your computer and use it in GitHub Desktop.
Parallel threading in Rust
use std::thread;
fn main() {
println!("Before thread");
// fill the vector
let handle =thread::spawn(|| {
println!("Printing GeeksQuiz from threads");
})
println!("After thread");
handle.join().unwrap();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment