摘要:
void function(); void function1(); std::thread t1( function ); //启动一个新线程t1与function关联 std::thread t2 = std::move(t1); //将t1限行的转移给t2 t1 = std::thread( 阅读全文
posted @ 2019-09-04 19:49
penuel
阅读(254)
评论(0)
推荐(0)
摘要:
#include <iostream>#include <thread>#include <windows.h> using namespace std;void switch_ab (int &a, int &b) //参数是引用可更改 //void switch_ab (int &a, int 阅读全文
posted @ 2019-09-04 19:22
penuel
阅读(348)
评论(0)
推荐(0)
摘要:
#include <iostream>#include <thread>#include <unistd.h>void hello(){ while(1) { std::cout << "hello world" << std::endl; for(int i=0;i<999999999;i++); 阅读全文
posted @ 2019-09-04 19:11
penuel
阅读(194)
评论(0)
推荐(0)

浙公网安备 33010602011771号