AceSmartSoft API Documentation
Public Member Functions | List of all members
SmartACE::SmartCVwithoutMemory Class Reference

#include <smartCondVar.hh>

Public Member Functions

 SmartCVwithoutMemory ()
 constructor More...
 
 ~SmartCVwithoutMemory ()
 destructor More...
 
 SmartCVwithoutMemory (const SmartCVwithoutMemory &)
 copy constructor More...
 
SmartCVwithoutMemoryoperator= (const SmartCVwithoutMemory &)
 copy assignment More...
 
void blockingUser (const bool)
 
void blockingPattern (const bool)
 
void blockingComponent (const bool)
 
void signal ()
 
Smart::StatusCode wait (const SmartTimeValue &timeout=SmartTimeValue::zero)
 

Detailed Description

Condition variable without memory

The condition variable is used to avoid active waiting. The condition variable has no memory and does not know whether it has been signalled before or not. It is therefore used for example within the pushNewestClient to wait for the next arriving update.

Condition variable discriminates between blockingPattern and blockingUser. Both can enforce non-blocking. The pattern uses the non-blocking mode to abort blocking waits when getting disconnected for example. This is used to avoid blocking calls for new updates if for example an unsubscribe is executed in parallel to a blocking call to "getUpdateWait" in the pushNewestClient. Please look there for further details. The user can enforce non-blocking mode to abort blocking waits for example to continue with processing without awaiting the answer.

One could also implement a counting blocking indicator with acquire/release member functions. It is however less error prone from the user view not to be forced to have a matching number of acquire/release calls and we therefore implemented separate flags for the pattern internal use and the user.

The wait() member function first checks the blocking flags. It returns immediately with SMART_CANCELLED if at least one flag enforces non-blocking mode. Otherwise it waits for either a signal or for being cancelled. If the condition variable is signalled, it returns with SMART_OK.

Constructor & Destructor Documentation

◆ SmartCVwithoutMemory() [1/2]

SmartACE::SmartCVwithoutMemory::SmartCVwithoutMemory ( )

constructor

◆ ~SmartCVwithoutMemory()

SmartACE::SmartCVwithoutMemory::~SmartCVwithoutMemory ( )

destructor

◆ SmartCVwithoutMemory() [2/2]

SmartACE::SmartCVwithoutMemory::SmartCVwithoutMemory ( const SmartCVwithoutMemory )

copy constructor

Member Function Documentation

◆ blockingComponent()

void SmartACE::SmartCVwithoutMemory::blockingComponent ( const bool  )

◆ blockingPattern()

void SmartACE::SmartCVwithoutMemory::blockingPattern ( const bool  )

◆ blockingUser()

void SmartACE::SmartCVwithoutMemory::blockingUser ( const bool  )

◆ operator=()

SmartCVwithoutMemory& SmartACE::SmartCVwithoutMemory::operator= ( const SmartCVwithoutMemory )

copy assignment

◆ signal()

void SmartACE::SmartCVwithoutMemory::signal ( )

◆ wait()

Smart::StatusCode SmartACE::SmartCVwithoutMemory::wait ( const SmartTimeValue timeout = SmartTimeValue::zero)

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