BDE 4.14.0 Production release
|
#include <bslstl_stoptoken.h>
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 |
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.
bsls::AtomicUint64 bslstl::StopToken_RefCountedState::d_stopSourceCount |
The number of bsl::stop_source
objects that refer to this stop state.