Address second part of review comments
This commit is contained in:
parent
0fe11746fc
commit
bbd85a495a
4 changed files with 18 additions and 14 deletions
|
@ -30,7 +30,7 @@ public:
|
|||
|
||||
template <class Duration>
|
||||
bool WaitFor(const std::chrono::duration<Duration>& time) {
|
||||
std::unique_lock<std::mutex> lk(mutex);
|
||||
std::unique_lock lk{mutex};
|
||||
if (!condvar.wait_for(lk, time, [this] { return is_set; }))
|
||||
return false;
|
||||
is_set = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue