Namespaces
Variants

std:: stop_callback_for_t

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
Definiert im Header <stop_token>
template < class T, class CallbackFn >
using stop_callback_for_t = T :: template callback_type < CallbackFn > ;
(seit C++26)

Die Alias-Vorlage stop_callback_for_t wird verwendet, um den Stopp-Callback-Typ des Typs T zu erhalten.

Hinweise

Die entsprechenden stop_callback_for_t für Standard-Stopp-Token-Typen und jede gültige CallbackFn sind:

  • Spezialisierung von std:: stop_callback für std:: stop_token ,
  • Spezialisierung von std :: inplace_stop_callback für std :: inplace_stop_token , und
  • nicht spezifizierter Typ ohne Registrierung und Deregistrierung von Stopp-Callbacks für std :: never_stop_token .