Skip to content

Instantly share code, notes, and snippets.

@George3d6
Last active September 16, 2018 23:16
Show Gist options
  • Save George3d6/89ff32df1861e44de53eed93b7eafca2 to your computer and use it in GitHub Desktop.
Save George3d6/89ff32df1861e44de53eed93b7eafca2 to your computer and use it in GitHub Desktop.
use std::thread;
fn work(magic_number: i32) { /* implementation */ }
fn main() {
t1 = thread::spawn(|| work(46));
t2 = thread::spawn(|| work(3));
t1.join()
t2.join()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment