首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::thread::id

Defined in header <thread>

?

?

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<std::thread::id>

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)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com