diff options
| author | Stefan Boberg <[email protected]> | 2021-05-25 09:54:09 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-05-25 09:54:09 +0200 |
| commit | 882e93e4786f9e67e0edf6c276b16bb40848bae9 (patch) | |
| tree | c5d4c45679c676c6aeb804c7601f43340b78ea0b /zencore/thread.cpp | |
| parent | Updated structured cache description (diff) | |
| parent | Compile out all rocksdb code for a smaller binary (diff) | |
| download | zen-882e93e4786f9e67e0edf6c276b16bb40848bae9.tar.xz zen-882e93e4786f9e67e0edf6c276b16bb40848bae9.zip | |
Merged from origin/main
Diffstat (limited to 'zencore/thread.cpp')
| -rw-r--r-- | zencore/thread.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/zencore/thread.cpp b/zencore/thread.cpp index 80cf6f100..4451fd302 100644 --- a/zencore/thread.cpp +++ b/zencore/thread.cpp @@ -58,13 +58,15 @@ Event::Reset() bool Event::Wait(int TimeoutMs) { + using namespace std::literals; + const DWORD Timeout = (TimeoutMs < 0) ? INFINITE : TimeoutMs; DWORD Result = WaitForSingleObject(m_EventHandle, Timeout); if (Result == WAIT_FAILED) { - throw WindowsException("Event wait failed"); + zen::ThrowLastError("Event wait failed"sv); } return (Result == WAIT_OBJECT_0); |