摘要: CountDownLatch 用于等待其它线程都处于就绪状态: #include <mutex> #include <condition_variable> class CountDownLatch { public: CountDownLatch(uint32_t count) : m_count 阅读全文
posted @ 2020-10-16 22:50 HachikoT 阅读(1043) 评论(0) 推荐(0)
摘要: ConcurrentQueue 用C++11提供的多线程类实现一个线程安全的队列: #include <queue> #include <mutex> #include <condition_variable> #include <utility> template<typename T, type 阅读全文
posted @ 2020-10-16 21:10 HachikoT 阅读(1826) 评论(0) 推荐(0)