C++ condition_variable的 notify_one()和notify_all() 区别
std::condition_variable::notify_one
https://en.cppreference.com/w/cpp/thread/condition_variable/notify_one
If any threads are waiting on *this, calling notify_one unblocks one of the waiting threads.
Notes The effects of notify_one()/notify_all() and each of the three atomic parts of wait()/wait_for()/wait_until() (unlock+wait, wakeup, and lock) take place in a single total order that can be viewed as
C++ condition_variable的 notify_one()和notify_all() 区别最先出现在Python成神之路。
共有 0 条评论