// NOTE: using here polling, but not waiting, on Win32,
// to avoid issue with blocking console read operation...
#ifdef _WIN32
- const std::chrono::milliseconds PollPeriod{100};
+ const std::chrono::milliseconds PollPeriod{1000};
#else
auto& PollPeriod = WaitForever;
#endif
}
assert(n == count);
- DWORD result;
- do result = WaitForMultipleObjects(count, events, FALSE, DWORD(timeout.count()));
- while (result == WAIT_TIMEOUT);
- return result != WAIT_FAILED;
+ DWORD result = WaitForMultipleObjects(count, events, FALSE, DWORD(timeout.count()));
+ return result != WAIT_FAILED && result != WAIT_TIMEOUT;
}
Class::IOResult Class::async_cancel(AsyncHandle& h)