First, in every C++ compiler I know of, vectors are internally an array, and you can get a pointer to the array with &yourvector[0]
. In C++11 I believe this behavior is also required by the standard. So there's no need to copy.
As for the benefit, WaitForMultipleObjects
will reduce the number of times you wake up, saving some small amount of CPU time. It will also atomically acquire all of the HANDLE
s at the same time - if you have a bunch of mutex or semaphore objects and need to lock them all, this can be important.