C++:線程(std::thread)

C++:線程(std::thread) 1.創建一個線程   創建線程比較簡單,使用std的thread實例化一個線程對象就創建完成了,示例: 1 #include <iostream> 2 #include <thread> //C++11纔有,之前是pthread.h文件 3 using namespace std; 4 5 void t1() //普通的函數,用來執行線程
相關文章
相關標籤/搜索