ThreadNote
C++11 之前
#include <pthread.h>
pthread_create (thread, attr, start_routine, arg)C++11
#include <thread>
std::thread nth(&ctr::Class::func, this); // 创建运行对象成员函数的线程
std::thread nth(func, "HELLO");构造函数
赋值操作
其他成员函数
终止线程
std::this_thread
Examples
主线程早于子线程退出
线程作为方法参数
判断线程是否有效
PS
线程+lambda
参考
编译
最后更新于