std::stop_source
From cppreference.com
Defined in header <stop_token>
|
||
class stop_source; |
(since C++20) | |
The stop_source
class provides the means to issue a stop request, such as for std::jthread cancellation. A stop request made for one stop_source
object is visible to all stop_source
s and std::stop_tokens of the same associated stop-state; any std::stop_callback(s) registered for associated std::stop_token(s) will be invoked, and any std::condition_variable_any objects waiting on associated std::stop_token(s) will be awoken.
Once a stop is requested, it cannot be withdrawn. Additional stop requests have no effect.
Contents |
[edit] Member functions
constructs new stop_source object (public member function) | |
destructs the stop_source object (public member function) | |
assigns the stop_source object (public member function) | |
Modifiers | |
makes a stop request for the associated stop-state, if any (public member function) | |
swaps two stop_source objects (public member function) | |
Observers | |
returns a stop_token for the associated stop-state (public member function) | |
checks whether the associated stop-state has been requested to stop (public member function) | |
checks whether associated stop-state can be requested to stop (public member function) |
[edit] Non-member functions
|