ecor
Loading...
Searching...
No Matches
ecor::inplace_stop_token Struct Reference

Public Types

template<typename CallbackFn >
using callback_type = inplace_stop_callback< CallbackFn >
 

Public Member Functions

constexpr bool stop_possible () const noexcept
 Check if stopping is possible. More...
 
bool stop_requested () const noexcept
 Check if a stop has been requested. More...
 

Friends

template<typename CallbackFn >
struct inplace_stop_callback
 
struct inplace_stop_source
 
bool operator!= (inplace_stop_token const &lhs, inplace_stop_token const &rhs) noexcept
 Inequality comparison operator, defined in terms of operator==.
 
bool operator== (inplace_stop_token const &lhs, inplace_stop_token const &rhs) noexcept
 Equality comparison operators, two inplace_stop_tokens are equal if they are associated with the same stop source (or both are not associated with any stop source).
 

Member Function Documentation

◆ stop_possible()

constexpr bool ecor::inplace_stop_token::stop_possible ( ) const
inlineconstexprnoexcept

Check if stopping is possible.

This returns true if this token is associated with a stop source, and false otherwise. If this token is not associated with a stop source, this returns false since there is no source to request a stop from.

◆ stop_requested()

bool ecor::inplace_stop_token::stop_requested ( ) const
inlinenoexcept

Check if a stop has been requested.

This returns true if the associated stop source has had request_stop() called on it, and false otherwise. If this token is not associated with a stop source, this returns false.


The documentation for this struct was generated from the following file: