Namespaces
Variants

std:: never_stop_token

From cppreference.net
Concurrency support library
Threads
(C++11)
(C++20)
this_thread namespace
(C++11)
(C++11)
Cooperative cancellation
(C++20)
never_stop_token
(C++26)
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>
class never_stop_token ;
(C++26부터)

never_stop_token 클래스는 정지가 절대 발생하지 않거나 요청되지 않음을 정적으로 제공하는 unstoppable_token 을 모델링합니다. 이는 쿼리 가능한 객체에서 다른 연관된 정지 토큰이 제공되지 않을 경우 std::get_stop_token 이 반환하는 기본 정지 토큰 유형입니다.

목차

멤버 별칭 템플릿

타입 정의
callback_type < Callback > /*callback-type*/
해당 타입은 다음과 같이 정의됩니다:
struct /*callback-type*/

{
explicit /*callback-type*/ ( never_stop_token,
auto && ) noexcept { }

} ;
( 설명 전용* )

멤버 함수

stop_requested
[static]
중지 요청이 절대 불가능함을 나타냄
(public static member function)
stop_possible
[static]
중지가 불가능함을 나타냄
(public static member function)
operator==
두 개의 never_stop_token 객체를 비교함
(public member function)

std::never_stop_token:: stop_requested

static constexpr bool stop_requested ( ) noexcept { return false ; }

항상 false 를 반환하며, 중단 요청이 절대 발생할 수 없음을 나타냅니다.

std::never_stop_token:: stop_possible

static constexpr bool stop_possible ( ) noexcept { return false ; }

항상 false 를 반환하며, 중지가 불가능함을 나타냅니다.

std::never_stop_token:: operator==

bool operator == ( const never_stop_token & ) const = default ;

두 개의 never_stop_token 객체는 항상 동일하게 비교됩니다.

예제