std::stop_source:: stop_requested
From cppreference.net
<
cpp
|
thread
|
stop source
C++
Concurrency support library
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
std::stop_source
| Member functions | ||||
| Modifiers | ||||
| Observers | ||||
|
stop_source::stop_requested
|
||||
| Non-member functions | ||||
| Helper tags | ||||
|
bool
stop_requested
(
)
const
noexcept
;
|
(自 C++20 起) | |
检查
stop_source
对象是否具有停止状态且该状态已收到停止请求。
参数
(无)
返回值
当
stop_token
对象具有停止状态且已收到停止请求时返回
true
,否则返回
false
。
示例
|
本节内容不完整
原因:缺少示例 |