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

event/Call: use std::lock_guard

parent f764925e
...@@ -51,10 +51,11 @@ public: ...@@ -51,10 +51,11 @@ public:
defer_event.Schedule(); defer_event.Schedule();
mutex.lock(); {
const std::lock_guard<Mutex> lock(mutex);
while (!done) while (!done)
cond.wait(mutex); cond.wait(mutex);
mutex.unlock(); }
if (exception) if (exception)
std::rethrow_exception(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