线程:CPP lambda表达式与多线程
c++ lambda表达式获取线程ID以及线程等待#include #includethread th1([]() { this_thread::sleep_for(chrono::seconds(3)); cout << this_thread::get_id() << endl; }); thread th2([]() { this_thread::sleep_for(