BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::StopToken_RefCountedState Struct Reference

#include <bslstl_stoptoken.h>

Inheritance diagram for bslstl::StopToken_RefCountedState:
bslstl::StopState

Public Attributes

bsls::AtomicUint64 d_stopSourceCount
 

Additional Inherited Members

- Public Member Functions inherited from bslstl::StopState
 StopState ()
 
bool enregister (StopStateCallbackNode *node)
 
void deregister (StopStateCallbackNode *node)
 
bool requestStop ()
 
BSLA_NODISCARD bool stopRequested () const
 

Detailed Description

This component-private struct adds a reference count to the internal StopState class. This reference count represents the number of bsl::stop_source objects that refer to the stop state (NOT the total number of objects that refer to the stop state).

Implementation note: The reference count has been kept outside the StopState object in order to enable StopState to potentially be reused to implement in_place_stop_source (from WG21 proposal P2300R7) without the overhead from the reference count.

Member Data Documentation

◆ d_stopSourceCount

bsls::AtomicUint64 bslstl::StopToken_RefCountedState::d_stopSourceCount

The number of bsl::stop_source objects that refer to this stop state.


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