std::stop_token Class Reference

`#include <stop_token>`

## Public Member Functions

| stop_token (const stop_token &) noexcept=default
| stop_token (stop_token &&) noexcept=default
stop_token & | operator= (const stop_token &) noexcept=default
stop_token & | operator= (stop_token &&) noexcept=default
bool | stop_possible () const noexcept
bool | stop_requested () const noexcept
void | swap (stop_token &__rhs) noexcept

## Friends

bool | operator== (const stop_token &__a, const stop_token &__b)
template<typename _Callback>
class | stop_callback
class | stop_source
void | swap (stop_token &__lhs, stop_token &__rhs) noexcept

## Detailed Description

Allow testing whether a stop request has been made on a stop_source.

Definition at line 55 of file stop_token.

## Member Function Documentation

## stop_possible()

bool std::stop_token::stop_possible | ( |  | ) | const

inline nodiscard noexcept

Definition at line 73 of file stop_token.

## stop_requested()

bool std::stop_token::stop_requested | ( |  | ) | const

inline nodiscard noexcept

Definition at line 80 of file stop_token.

## swap()

void std::stop_token::swap | ( | stop_token & | __rhs | ) |

inline noexcept

Definition at line 86 of file stop_token.

## Friends And Related Symbol Documentation

## operator==

bool operator== | ( | const stop_token & | __a,
|  | const stop_token & | __b )

friend

Definition at line 91 of file stop_token.

## stop_callback

template<typename _Callback>

friend class stop_callback

friend

Definition at line 101 of file stop_token.

## stop_source

friend class stop_source

friend

Definition at line 99 of file stop_token.

## swap

void swap | ( | stop_token & | __lhs,
|  | stop_token & | __rhs )

friend

Definition at line 95 of file stop_token.

The documentation for this class was generated from the following file:

- stop_token