std::jthread::get_stop_token
来自cppreference.com
并发支持库
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::jthread
| 成员函数 | ||||
| 观察器 | ||||
| 操作 | ||||
| 停止状态处理 | ||||
|
jthread::get_stop_token
|
||||
| 非成员函数 | ||||
|
std::stop_token
get_stop_token()
const
noexcept;
|
(C++20 起) | |
返回 std::stop_token ,与 jthread
对象内部保有的同一共享停止状态关联。
参数
(无)
返回值
std::stop_token 类型值,与 jthread
对象内部保有的共享停止状态关联。
示例
| 本节未完成 原因:暂无示例 |