33 Concurrency support library [thread]

33.3 Stop tokens [thread.stoptoken]

33.3.9 Class inplace_stop_source [stopsource.inplace]

33.3.9.3 Member functions [stopsource.inplace.mem]

constexpr inplace_stop_token get_token() const noexcept;
Returns: A new associated inplace_stop_token object whose stop-source member is equal to this.
bool stop_requested() const noexcept;
Returns: true if the stop state inside *this has received a stop request; otherwise, false.
bool request_stop() noexcept;
Effects: Executes a stop request operation ([stoptoken.concepts]).
Postconditions: stop_requested() is true.