std::unstoppable_token

来自cppreference.com
< cpp‎ | thread
 
 
并发支持库
线程
(C++11)
(C++20)
this_thread 命名空间
(C++11)
(C++11)
(C++11)
协作式取消
unstoppable_token
(C++26)
互斥
(C++11)
通用锁管理
(C++11)
(C++11)
(C++11)
(C++11)
(C++11)
条件变量
(C++11)
信号量
闩与屏障
(C++20)
(C++20)
未来体
(C++11)
(C++11)
(C++11)
(C++11)
安全回收
(C++26)
风险指针
原子类型
(C++11)
(C++20)
原子类型的初始化
(C++11)(C++20 弃���)
(C++11)(C++20 弃用)
内存定序
(C++11)(C++26 弃用)
原子操作的自由函数
原子标志的自由函数
 
在标头 <stop_token> 定义
template< class Token >

concept unstoppable_token =
    std::stoppable_token<Token> &&
    requires (const Token tok) {
        requires std::bool_constant<(!tok.stop_possible())>::value;

    };
(C++26 起)

概念 unstoppable_token<Token>stoppable_token 指定额外的要求,其类型不允许停止。即表达式 tok.stop_possible() 必须可用在常量表达式中并返回 false