MCPcopy Create free account
hub / github.com/David-Haim/concurrencpp / notify_one

Method notify_one

source/threads/async_condition_variable.cpp:66–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void 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
76void async_condition_variable::notify_all() {
77 std::unique_lock<std::mutex> lock(m_lock);

Calls 3

pop_frontMethod · 0.80
unlockMethod · 0.80
resumeMethod · 0.80