rad 6.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rad::detail::StopState Struct Reference

#include <stopToken.hpp>

Public Member Functions

 StopState () noexcept=default
 
void IncSources () noexcept
 
void DecSources () noexcept
 
void IncTokens () noexcept
 
void DecTokens () noexcept
 
unsigned GetNumSources () const noexcept
 
unsigned GetNumTokens () const noexcept
 
bool StopRequested () const noexcept
 
bool RequestStop () noexcept
 

Detailed Description

Shared stop state between StopSource and StopToken.

Note
: Non-optimized implementation.

Constructor & Destructor Documentation

◆ StopState()

rad::detail::StopState::StopState ( )
defaultnoexcept

Member Function Documentation

◆ DecSources()

void rad::detail::StopState::DecSources ( )
noexcept

◆ DecTokens()

void rad::detail::StopState::DecTokens ( )
noexcept

◆ GetNumSources()

unsigned rad::detail::StopState::GetNumSources ( ) const
noexcept

◆ GetNumTokens()

unsigned rad::detail::StopState::GetNumTokens ( ) const
noexcept

◆ IncSources()

void rad::detail::StopState::IncSources ( )
noexcept

◆ IncTokens()

void rad::detail::StopState::IncTokens ( )
noexcept

◆ RequestStop()

bool rad::detail::StopState::RequestStop ( )
noexcept

Perform atomic CAS on m_stop_requested

Returns
true if value was set.
false otherwise.

◆ StopRequested()

bool rad::detail::StopState::StopRequested ( ) const
noexcept

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