MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / WaitForMultipleObjects

Function WaitForMultipleObjects

Win32Lib/Win32Lib.cpp:303–315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301}
302
303WaitResult 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
317WaitResult WaitForAnyObject(const HANDLE* begin, const HANDLE* end, DWORD milliSeconds)
318{

Callers 2

WaitForAnyObjectFunction · 0.70
WaitForAllObjectsFunction · 0.70

Calls 2

WaitResultClass · 0.85
ThrowLastErrorFunction · 0.85

Tested by

no test coverage detected