摘要:
#include<iostream> #include<thread> #include<mutex> using namespace std; recursive_mutex re; void task1() { re.lock(); cout << "处理任务1中..." << endl; st 阅读全文
摘要:
#include<iostream> #include<thread> #include<mutex> using namespace std; mutex mu; void ThreadSource(int i) { mu.lock(); cout << "线程" << i << "开始执行了" 阅读全文