event/Call: use std::lock_guard
This commit is contained in:
parent
f764925edc
commit
0e48747607
@ -51,10 +51,11 @@ public:
|
|||||||
|
|
||||||
defer_event.Schedule();
|
defer_event.Schedule();
|
||||||
|
|
||||||
mutex.lock();
|
{
|
||||||
while (!done)
|
const std::lock_guard<Mutex> lock(mutex);
|
||||||
cond.wait(mutex);
|
while (!done)
|
||||||
mutex.unlock();
|
cond.wait(mutex);
|
||||||
|
}
|
||||||
|
|
||||||
if (exception)
|
if (exception)
|
||||||
std::rethrow_exception(exception);
|
std::rethrow_exception(exception);
|
||||||
|
Loading…
Reference in New Issue
Block a user