title: learning threads on linux
body: <p>Linux is a new platform to me.  I've coded on Windows in c++ for a number of years and have become comfortable with multithreading on that platform.</p>
  
  <p>Along comes C++11 at a time when I need to learn c++ on the linux platform.</p>
  
  <p>Linux appears to use pthreads for the most part - okay there's also boost::threads and QT have their own threads too.  But with C++11 comes std::thread, a whole new (cross platform and C++ standard) way to do threads.</p>
  
  <p>So I guess I'll have to learn pthreads and std::threads.  Ultimately, std::thread seems more important, but there's a lot of legacy code out there, so I'll have to know both.</p>
  
  <p>For thread synchronization on windows, I would use <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ms687025%28v=vs.85%29.aspx" rel="nofollow">WaitForMultipleObjects</a> to wait for a number of tasks to complete before continuing with further work.</p>
  
  <p>Does a similar synchronization mechanism exist for pthreads?  std::threads?</p>
  
  <p>I've had a look at <a href="http://www.kernel.org/doc/man-pages/online/pages/man3/pthread_join.3.html" rel="nofollow">pthread_join</a>, and it seems to have the facility to only wait on one thread at a time.  Am I missing another pthread call maybe?</p>