If *this refers to a stop state and that stop state has not had a stop requested yet, atomically request a stop on that stop state, invoke all registered callbacks in an unspecified order, and finally return true. Otherwise, return false. If this function returns true, the call synchronizes with any call to stop_requested that returns true. A call to request_stop that is potentially concurrent with a call to stop_requested, stop_possible, or request_stop does not cause a data race.
Declared in <bslstl_stoptoken.h>
bool
request_stop() noexcept;