std::stop_source Class Reference

`#include <stop_token>`

## Public Member Functions

| stop_source (const stop_source &__other) noexcept
| stop_source (std::nostopstate_t) noexcept
| stop_source (stop_source &&) noexcept=default
stop_token | get_token () const noexcept
stop_source & | operator= (const stop_source &__other) noexcept
stop_source & | operator= (stop_source &&) noexcept=default
bool | request_stop () const noexcept
bool | stop_possible () const noexcept
bool | stop_requested () const noexcept
void | swap (stop_source &__other) noexcept

## Friends

bool | operator== (const stop_source &__a, const stop_source &__b) noexcept
void | swap (stop_source &__lhs, stop_source &__rhs) noexcept

## Detailed Description

A type that allows a stop request to be made.

Definition at line 481 of file stop_token.

## Constructor & Destructor Documentation

## stop_source() [1/3]

std::stop_source::stop_source | ( |  | ) |

inline

Definition at line 484 of file stop_token.

## stop_source() [2/3]

std::stop_source::stop_source | ( | std::nostopstate_t |  | ) |

inline explicit noexcept

Definition at line 487 of file stop_token.

## stop_source() [3/3]

std::stop_source::stop_source | ( | const stop_source & | __other | ) |

inline noexcept

Definition at line 490 of file stop_token.

## ~stop_source()

std::stop_source::~stop_source | ( |  | ) |

inline

Definition at line 515 of file stop_token.

## Member Function Documentation

## get_token()

stop_token std::stop_source::get_token | ( |  | ) | const

inline nodiscard noexcept

Definition at line 545 of file stop_token.

## operator=()

stop_source & std::stop_source::operator= | ( | const stop_source & | __other | ) |

inline noexcept

Definition at line 500 of file stop_token.

## request_stop()

bool std::stop_source::request_stop | ( |  | ) | const

inline noexcept

Definition at line 536 of file stop_token.

## stop_possible()

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

inline nodiscard noexcept

Definition at line 523 of file stop_token.

## stop_requested()

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

inline nodiscard noexcept

Definition at line 530 of file stop_token.

## swap()

void std::stop_source::swap | ( | stop_source & | __other | ) |

inline noexcept

Definition at line 551 of file stop_token.

## Friends And Related Symbol Documentation

## operator==

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

friend

Definition at line 558 of file stop_token.

## swap

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

friend

Definition at line 564 of file stop_token.

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

- stop_token