| 64 | } |
| 65 | |
| 66 | void async_condition_variable::notify_one() { |
| 67 | std::unique_lock<std::mutex> lock(m_lock); |
| 68 | const auto awaiter = m_awaiters.pop_front(); |
| 69 | lock.unlock(); |
| 70 | |
| 71 | if (awaiter != nullptr) { |
| 72 | awaiter->resume(); |
| 73 | } |
| 74 | } |
| 75 | |
| 76 | void async_condition_variable::notify_all() { |
| 77 | std::unique_lock<std::mutex> lock(m_lock); |