I wrote an application using pthreads which had 5 threads. 4 of the threads filled up 4 buffers and once they had been filled the main thread would be combine these together. This was achieve using barrier so the main thread would wait until the 4 worker threads had reached the barrier.
I am looking at re-writing this but using c++ 11 threads and see there isn't a barrier as such available and wanted to know what would be the best/safest way to achieve the same result as the pthread based program.
Thanks in advance.