C++-std::this_thread::get_id()
-获取线程id
std::this_thread::get_id()
头文件:<thread>
函数:std::this_thread::get_id()
用例:std::thread::id thread_id = std::this_thread::get_id();
std::thread
对象的成员函数get_id()
头文件:<thread>
函数:std::thread::id get_id()
用例:通过调用std::thread对象的成员函数get_id()来直接获取
#include <thread>
std::thread t;
t.get_id();
标签:std,thread,get,C++,线程,id
From: https://www.cnblogs.com/yongchao/p/17364358.html