BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bslstl::StopState Class Reference

#include <bslstl_stopstate.h>

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

Public Member Functions

 StopState ()
 
bool enregister (StopStateCallbackNode *node)
 
void deregister (StopStateCallbackNode *node)
 
bool requestStop ()
 
BSLA_NODISCARD bool stopRequested () const
 

Constructor & Destructor Documentation

◆ StopState()

bslstl::StopState::StopState ( )

Create a StopState object that initially has no registered callbacks and on which a stop has not been requested.

Member Function Documentation

◆ deregister()

void bslstl::StopState::deregister ( StopStateCallbackNode node)

If the callback of the specified node is currently executing, wait for it to complete. Otherwise, remove node from the list of nodes registered to this state. The behavior is undefined if this method is called more than once for a given node or if node was not previously registered to this state by a call to enregister that returned true.

◆ enregister()

bool bslstl::StopState::enregister ( StopStateCallbackNode node)

If a stop has already been requested, then invoke the callback of the specified node and return false. Otherwise, add node to the list of nodes registered to this state and return true. The behavior is undefined if this method is called more than once for a given node.

◆ requestStop()

bool bslstl::StopState::requestStop ( )

If this StopState object has already had a stop requested, return false. Otherwise, atomically mark this StopState object as having had a stop requested, then execute all registered callbacks in an unspecified order, and finally return true.

◆ stopRequested()

BSLA_NODISCARD bool bslstl::StopState::stopRequested ( ) const

Return true if a stop has been requested on this StopState object, and false otherwise.


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