event/Call: use std::lock_guard
This commit is contained in:
parent
f764925edc
commit
0e48747607
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user