摘要: #include<iostream> #include<thread> #include<mutex> using namespace std; recursive_mutex re; void task1() { re.lock(); cout << "处理任务1中..." << endl; st 阅读全文
posted @ 2021-03-13 19:41 sunshine_gzw 阅读(2465) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<thread> #include<mutex> using namespace std; mutex mu; void ThreadSource(int i) { mu.lock(); cout << "线程" << i << "开始执行了" 阅读全文
posted @ 2021-03-13 19:39 sunshine_gzw 阅读(1120) 评论(0) 推荐(0) 编辑