# std::stoppable_token

> C++ Atlas: `cppatlas.com/w/cpp/thread/stoppable_token` | Source: https://en.cppreference.com/w/cpp/thread/stoppable_token | Domain: Concurrency support | Standards: C++26

The concept stoppable_token<Token> specifies the basic interface of a stop token that is copyable and equality_comparable and allows polling to see if the stop request is possible and whether the request has been made.

## Official Specification Summary (cppreference)

```cpp
// Defined in header <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; // see implicit expression variations
    } &&
    std::copyable<Token> &&
    std::equality_comparable<Token>; // (since C++26)

// Helper templates

template< template<class> class >
struct /*check-type-alias-exists*/; // not defined // (exposition only*)
```

The concept `stoppable_token<Token>` specifies the basic interface of a stop token that is `copyable` and `equality_comparable` and allows polling to see if the stop request is possible and whether the request has been made.

### Semantic requirements

> Note: This section is incomplete

### See also

- [`unstoppable_token`](https://en.cppreference.com/w/cpp/thread/unstoppable_token) (C++26): specifies a stop token that does not allow stopping (concept)

---
Attribution: content from https://en.cppreference.com/w/cpp/thread/stoppable_token (cppreference.com), licensed under CC-BY-SA 3.0 and GFDL. Modified: converted to markdown, study notes added. Offline snapshot of 9 February 2025.