摘要:
#include <iostream> #include <mutex> #include <thread> #include <condition_variable> std::mutex mutex; std::condition_variable cond; void in_msg() { w 阅读全文
摘要:
#include <iostream> #include <mutex> using namespace std; class MyInstance { MyInstance(){} public: static MyInstance *getInstance() { std::call_once( 阅读全文
摘要:
#include <iostream> using namespace std; class MyInstance { MyInstance(){} public: static MyInstance *getInstance() { if(m_instance == NULL) { m_insta 阅读全文
摘要:
#include <iostream> #include <mutex> #include <thread> void msg_func() { std::mutex mutex; while(1) { std::unique_lock<std::mutex> unique(mutex); std: 阅读全文
摘要:
#include <iostream> #include <mutex> #include <thread> void msg_func() { std::mutex mutex; while(1) { std::unique_lock<std::mutex> unique(mutex, std:: 阅读全文
摘要:
#include <iostream> #include <mutex> #include <thread> void msg_func() { std::mutex mutex; while(1) { std::unique_lock<std::mutex> unique(mutex, std:: 阅读全文
摘要:
#include <iostream> #include <mutex> #include <thread> void msg_func() { std::mutex mutex; while(1) { mutex.lock(); std::unique_lock<std::mutex> uniqu 阅读全文
摘要:
#include <iostream> #include <mutex> #include <thread> void msg_func() { std::mutex mutex; while(1) { std::unique_lock<std::mutex> unique(mutex); std: 阅读全文
摘要:
#include <iostream> #include <mutex> #include <thread> void msg_func() { std::mutex mutex; while(1) { std::lock_guard<std::mutex> guard(mutex); std::c 阅读全文