diff options
Diffstat (limited to 'src/common/thread.h')
| -rw-r--r-- | src/common/thread.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/thread.h b/src/common/thread.h index 5584c3bf3..2fc071685 100644 --- a/src/common/thread.h +++ b/src/common/thread.h | |||
| @@ -30,7 +30,7 @@ public: | |||
| 30 | 30 | ||
| 31 | template <class Duration> | 31 | template <class Duration> |
| 32 | bool WaitFor(const std::chrono::duration<Duration>& time) { | 32 | bool WaitFor(const std::chrono::duration<Duration>& time) { |
| 33 | std::unique_lock<std::mutex> lk(mutex); | 33 | std::unique_lock lk{mutex}; |
| 34 | if (!condvar.wait_for(lk, time, [this] { return is_set; })) | 34 | if (!condvar.wait_for(lk, time, [this] { return is_set; })) |
| 35 | return false; | 35 | return false; |
| 36 | is_set = false; | 36 | is_set = false; |