| 301 | } |
| 302 | |
| 303 | WaitResult WaitForMultipleObjects(const HANDLE* begin, const HANDLE* end, bool waitAll, DWORD milliSeconds) |
| 304 | { |
| 305 | size_t count = end - begin; |
| 306 | auto rc = ::WaitForMultipleObjects(count, begin, waitAll, milliSeconds); |
| 307 | if (rc == WAIT_TIMEOUT) |
| 308 | return WaitResult(false); |
| 309 | if (rc == WAIT_FAILED) |
| 310 | ThrowLastError("WaitForMultipleObjects"); |
| 311 | if (rc >= WAIT_OBJECT_0 && rc < WAIT_OBJECT_0 + count) |
| 312 | return WaitResult(true, rc - WAIT_OBJECT_0); |
| 313 | else |
| 314 | throw std::runtime_error("WaitForMultipleObjects"); |
| 315 | } |
| 316 | |
| 317 | WaitResult WaitForAnyObject(const HANDLE* begin, const HANDLE* end, DWORD milliSeconds) |
| 318 | { |
no test coverage detected