![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
并发编程
ruihuank
这个作者很懒,什么都没留下…
展开
-
双线程高效下载
编程之美 10 // 不确定对否 class Semaphore { public: Semaphore(int count_, int max_count_) : count(count_), max_count(max_count_) {} void signal() { std::unique_lock<std::mutex> lock(m...原创 2018-04-22 20:42:45 · 219 阅读 · 0 评论 -
Semaphore
#include <mutex> #include <condition_variable> #include <thread> class Semaphore { public: Semaphore(int count_ = 0): count(count_) {} void notify() { std::unique_lock<std::mu...转载 2018-04-22 21:01:50 · 151 阅读 · 0 评论