Commit 0e487476 authored by Max Kellermann's avatar Max Kellermann

event/Call: use std::lock_guard

parent f764925e
......@@ -51,10 +51,11 @@ public:
defer_event.Schedule();
mutex.lock();
while (!done)
cond.wait(mutex);
mutex.unlock();
{
const std::lock_guard<Mutex> lock(mutex);
while (!done)
cond.wait(mutex);
}
if (exception)
std::rethrow_exception(exception);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment