Component‐private StopState with a stop_source reference count.
Synopsis
Declared in <bslstl_stoptoken.h>
struct StopToken_RefCountedState
: StopState
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.
Base Classes
Name |
Description |
Shared stop state that tracks a stop request and registered callbacks. |
Member Functions
Name |
Description |
Remove |
|
Register |
|
Request a stop on this state and invoke all registered callbacks. |
|
Return |
Data Members
Name |
Description |
The number of |
Created with MrDocs