class stop_token;
(since C++20)The stop_token
class provides the means to check if a stop request has been made or can be made, for its associated std::stop_source object. It is essentially a thread-safe "view" of the associated stop-state.
The stop_token
can also be passed to the constructor of std::stop_callback, such that the callback will be invoked if the stop_token
's associated std::stop_source is requested to stop. And stop_token
can be passed to the interruptible waiting functions of std::condition_variable_any, to interrupt the condition variable's wait if stop is requested.
stop_token
object
stop_token
object
stop_token
object
stop_token
objects
A stop_token
object is not generally constructed independently, but rather retrieved from a std::jthread or std::stop_source. This makes it share the same associated stop-state as the std::jthread or std::stop_source.
Possible output:
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4