| 254 | TEST_F(ConditionVariableTest, testNotifyOneQueue) { |
| 255 | struct Queue { |
| 256 | void push(int i) { |
| 257 | { |
| 258 | std::unique_lock lk(mutex); |
| 259 | q.push(i); |
| 260 | } |
| 261 | cv.notifyOne(); |
| 262 | } |
| 263 | Lazy<> pop(int& i) { |
| 264 | std::unique_lock lk(mutex); |
| 265 | co_await cv.wait(mutex, [&]() { return !q.empty(); }); |