Address second part of review comments

This commit is contained in:
FearlessTobi 2019-11-03 08:07:04 +01:00
parent 0fe11746fc
commit bbd85a495a
4 changed files with 18 additions and 14 deletions

View file

@ -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;