Linux is a new platform for me. I have been coding on Windows in C ++ for several years and have become comfortable with multithreading on this platform.
In addition to C ++ 11 at the time when I need to learn C ++ on the linux platform.
Linux apparently uses pthreads for the most part - well, boost :: threads and QT also have their own threads there. But with C ++ 11 comes std :: thread, a completely new (cross-platform and C ++ standard) way of making threads.
So, I think I will have to learn pthreads and std :: threads. Ultimately, std :: thread seems more important, but there is a lot of outdated code, so I should know both.
To synchronize threads on Windows, I would use WaitForMultipleObjects to wait for a series of tasks to complete before continuing.
Is there a similar synchronization mechanism for pthreads? std :: topics?
I looked at pthread_join , and it looks like it has the ability to wait only one thread at a time. Perhaps I missed another pthread call?
c ++ linux pthreads c ++ 11 stdthread
user206705 May 30 '12 at 14:24 2012-05-30 14:24
source share