Namespaces
Variants

std:: stoppable_token

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
Mutual exclusion
Generic lock management
Condition variables
(C++11)
Semaphores
Latches and Barriers
(C++20)
(C++20)
Futures
(C++11)
(C++11)
(C++11)
Safe reclamation
Hazard pointers
Atomic types
(C++11)
(C++20)
Initialization of atomic types
(C++11) (deprecated in C++20)
(C++11) (deprecated in C++20)
Memory ordering
(C++11) (deprecated in C++26)
Free functions for atomic operations
Free functions for atomic flags
헤더에 정의됨 <stop_token>
template < class Token >

concept stoppable_token =
requires ( const Token tok ) {
typename /*check-type-alias-exists*/ < Token :: template callback_type > ;
{ tok. stop_requested ( ) } noexcept - > std:: same_as < bool > ;
{ tok. stop_possible ( ) } noexcept - > std:: same_as < bool > ;
{ Token ( tok ) } noexcept ; // 암시적 표현 변형 참조
} &&
std:: copyable < Token > &&

std:: equality_comparable < Token > ;
(C++26부터)
도우미 템플릿
template < template < class > class >
struct /*check-type-alias-exists*/ ; // 정의되지 않음
( 설명 전용* )

stoppable_token<Token> 개념은 copyable equality_comparable 이며 중지 요청이 가능한지 여부와 요청이 이미 발생했는지 확인할 수 있는 기본 스톱 토큰 인터페이스를 명시합니다.

의미론적 요구사항

참고 항목

중단을 허용하지 않는 스톱 토큰을 명시함
(concept)