std::thread::id
STD::线程::ID
Defined in header | | |
---|---|---|
class thread::id; | | (since C++11) |
全班thread::id
是一个轻量级的、可复制的类,用作std::thread
物品。
该类的实例也可能包含不代表任何线程的特殊的不同值。线程完成后,std::thread::id
可以被另一个线程重用。
这个类被设计成用于关联容器中的键,无论是有序的还是无序的。
成员函数
(constructor) | constructs an id that does not represent a thread (public member function) |
---|
非会员职能
operator==operator!=operator< operator<= operator> operator>= | compares two thread::id objects (function) |
---|---|
operator<< | serializes a thread::id object (function template) |
帮助者类
std::hash | specializes std::hash (class template specialization) |
---|
另见
get_id (C++11) | returns the id of the thread (public member function) |
---|---|
get_id (C++11) | returns the thread id of the current thread (function) |
© cppreference.com
在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。