名稱空間
變體
操作

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