WaitForMultipleObjects alternative with std::thread?
c++, multithreading, stl
Solution
To the very best of my knowledge, there is nothing in the standard library that supports a wait of that nature. The standard library is built on top of the underlying operating system threading support. By necessity the standard library can only offer lowest common denominator functionality. Which means that it is not able to wrap some of the richer functionality offered by the Win32 threading library.
Problem
My problem is that I have multiple threads, they are stored in some container, and I need to know when a thread at a certain position finished. On windows I would do something like: ``` HANDLE handles[3]; //handles were initialized DWORD finishingThread = WaitForMultipleObjects(3, handles, false, INFINITE) ``` Is there any way to achieve the same effect with std::thread?