std::inplace_stop_token::stop_possible
bool stop_possible() const noexcept;
|
(since C++26) | |
Checks if the inplace_stop_token object has associated stop-state, and that state either has already had a stop requested or it has associated std::stop_source object(s).
Equivalent to return this->/*stop_source_*/ != nullptr;.
A default constructed inplace_stop_token has no associated stop-state, and thus cannot be stopped; the associated stop-state for which no std::stop_source object(s) exist can also not be stopped if such a request has not already been made.
If the call does not happens strongly before the end of the storage duration of the associated std::inplace_stop_source object (if any), the behavior is implementation-defined.
Return value
false if the inplace_stop_token object has no associated stop-state, or it did not yet receive a stop request and there are no associated std::stop_source object(s); true otherwise.
Notes
If the inplace_stop_token object has associated stop-state and a stop request has already been made, this function still returns true.
Example
| This section is incomplete Reason: no example |