5 #include <condition_variable>
10 std::condition_variable condition_;
11 unsigned long count_ = 0;
15 std::lock_guard<decltype(mutex_)> lock(mutex_);
17 condition_.notify_one();
21 std::unique_lock<decltype(mutex_)> lock(mutex_);
23 condition_.wait(lock);
29 std::lock_guard<decltype(mutex_)> lock(mutex_);