libstp
Robotics library for Botball
Loading...
Searching...
No Matches
libstp::threading::compat::stop_token Class Reference

#include <jthread_compat.hpp>

Public Member Functions

 stop_token ()=default
 stop_token (std::shared_ptr< std::atomic< bool > > flag) noexcept
bool stop_requested () const noexcept
bool stop_possible () const noexcept

Detailed Description

Cooperative stop signal observed by a daemon. Shares a refcounted flag with its stop_source; thread-safe.

Definition at line 37 of file jthread_compat.hpp.

Constructor & Destructor Documentation

◆ stop_token() [1/2]

libstp::threading::compat::stop_token::stop_token ( )
default

◆ stop_token() [2/2]

libstp::threading::compat::stop_token::stop_token ( std::shared_ptr< std::atomic< bool > > flag)
inlineexplicitnoexcept

Definition at line 41 of file jthread_compat.hpp.

Member Function Documentation

◆ stop_possible()

bool libstp::threading::compat::stop_token::stop_possible ( ) const
inlinenodiscardnoexcept

Definition at line 51 of file jthread_compat.hpp.

◆ stop_requested()

bool libstp::threading::compat::stop_token::stop_requested ( ) const
inlinenodiscardnoexcept

Definition at line 46 of file jthread_compat.hpp.


The documentation for this class was generated from the following file:
  • /home/runner/work/raccoon-lib/raccoon-lib/modules/libstp-threading/include/threading/jthread_compat.hpp