a guest Jan 20th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // main thread, do something
  2. for (int i = 0; i < thread_n; i++) {
  3.   // spawn a thread, let it do some work
  4. }
  5. // wait for each of the previous threads to finish, collect results
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