aboutsummaryrefslogtreecommitdiff
path: root/zencore/thread.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-05-25 09:54:09 +0200
committerStefan Boberg <[email protected]>2021-05-25 09:54:09 +0200
commit882e93e4786f9e67e0edf6c276b16bb40848bae9 (patch)
treec5d4c45679c676c6aeb804c7601f43340b78ea0b /zencore/thread.cpp
parentUpdated structured cache description (diff)
parentCompile out all rocksdb code for a smaller binary (diff)
downloadzen-882e93e4786f9e67e0edf6c276b16bb40848bae9.tar.xz
zen-882e93e4786f9e67e0edf6c276b16bb40848bae9.zip
Merged from origin/main
Diffstat (limited to 'zencore/thread.cpp')
-rw-r--r--zencore/thread.cpp4
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);