modm API documentation
modm::fiber::stop_state Class Reference

#include <modm/processing/fiber/stop_token.hpp>

Public Member Functions

bool stop_requested () const
 
bool request_stop ()
 
constexpr stop_source get_source ()
 
constexpr stop_token get_token ()
 

Detailed Description

Provides the implementation and memory storage for the stop request. You must allocate this object yourself and derive the token and source then from this object. This manual memory management differs from the std interface.

Warning
The lifetime of this object must be longer or equal to the lifetime of the derived stop_token and stop_source.

Member Function Documentation

bool modm::fiber::stop_state::request_stop ( )
inline
Note
This function can be called from an interrupt.
bool modm::fiber::stop_state::stop_requested ( ) const
nodiscardinline
Note
This function can be called from an interrupt.

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