[thread.stoptoken.syn]

# 32 Concurrency support library [[thread]](./#thread)

## 32.3 Stop tokens [[thread.stoptoken]](thread.stoptoken#syn)

### 32.3.2 Header <stop_token> synopsis [thread.stoptoken.syn]

[ð](#header:%3cstop_token%3e)

namespace std {// [[stoptoken.concepts]](stoptoken.concepts "32.3.3 Stop token concepts"), stop token conceptstemplate<class CallbackFn, class Token, class Initializer = CallbackFn>concept [*stoppable-callback-for*](stoptoken.concepts#concept:stoppable-callback-for "32.3.3 Stop token concepts [stoptoken.concepts]") = *see below*; // *exposition only*template<class Token>concept [stoppable_token](stoptoken.concepts#concept:stoppable_token "32.3.3 Stop token concepts [stoptoken.concepts]") = *see below*; template<class Token>concept [unstoppable_token](stoptoken.concepts#concept:unstoppable_token "32.3.3 Stop token concepts [stoptoken.concepts]") = *see below*; template<class Source>concept [*stoppable-source*](stoptoken.concepts#concept:stoppable-source "32.3.3 Stop token concepts [stoptoken.concepts]") = *see below*; // *exposition only*// [[stoptoken]](stoptoken "32.3.4 Class stop_­token"), class stop_tokenclass stop_token; // [[stopsource]](stopsource "32.3.5 Class stop_­source"), class stop_sourceclass stop_source; // no-shared-stop-state indicatorstruct nostopstate_t {explicit nostopstate_t() = default; }; inline constexpr nostopstate_t nostopstate{}; // [[stopcallback]](stopcallback "32.3.6 Class template stop_­callback"), class template stop_callbacktemplate<class Callback>class stop_callback; // [[stoptoken.never]](stoptoken.never "32.3.7 Class never_­stop_­token"), class never_stop_tokenclass never_stop_token; // [[stoptoken.inplace]](stoptoken.inplace "32.3.8 Class inplace_­stop_­token"), class inplace_stop_tokenclass inplace_stop_token; // [[stopsource.inplace]](stopsource.inplace "32.3.9 Class inplace_­stop_­source"), class inplace_stop_sourceclass inplace_stop_source; // [[stopcallback.inplace]](stopcallback.inplace "32.3.10 Class template inplace_­stop_­callback"), class template inplace_stop_callbacktemplate<class CallbackFn>class inplace_stop_callback; template<class T, class CallbackFn>using stop_callback_for_t = T::template callback_type<CallbackFn>;}
