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成神之路

版权声明:
作者:admin
链接:https://www.techfm.club/p/19340.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>