fesa::ConditionalVariable Class Reference

This class is a c++ wrapper in order to use conditional variables. Conditional variables help to synchronize threads when there's a logical condition for the synchronization. More...

#include <ConditionalVariable.h>

List of all members.

Public Member Functions

 ConditionalVariable ()
 constructor

Exceptions:
FesaException 

virtual ~ConditionalVariable ()
 destructor
void signal ()
 This method sends a signal to the conditional variable telling it that the thread can continue

Exceptions:
FesaException. 

void wait (Mutex &mutex)
 This method waits until a signal arrives stopping the thread. The mutex passed by argument has to be locked before invoking this method.

Private Attributes

pthread_cond_t condition_
 internal condition representation

Detailed Description

This class is a c++ wrapper in order to use conditional variables. Conditional variables help to synchronize threads when there's a logical condition for the synchronization.

Definition at line 21 of file ConditionalVariable.h.


Constructor & Destructor Documentation

fesa::ConditionalVariable::ConditionalVariable (  ) 

constructor

Exceptions:
FesaException 

Definition at line 14 of file ConditionalVariable.cpp.

References condition_, and FesaErrorCreatingConditionalVariable.

fesa::ConditionalVariable::~ConditionalVariable (  )  [virtual]

destructor

Definition at line 21 of file ConditionalVariable.cpp.

References condition_.


Member Function Documentation

void fesa::ConditionalVariable::signal (  ) 
void fesa::ConditionalVariable::wait ( Mutex mutex  ) 

This method waits until a signal arrives stopping the thread. The mutex passed by argument has to be locked before invoking this method.

Parameters:
mutex to lock

Definition at line 44 of file ConditionalVariable.cpp.

References condition_, FesaErrorWaitingConditionalVariable, and fesa::AbstractMutex::lock_.

Referenced by fesa::LocalMsgQueue::consumeMsg(), fesa::RTScheduler::run(), fesa::NotificationThread::run(), fesa::PersistencyManager::run(), fesa::ProxyReplyHandler::waitReply(), and fesa::AbstractEventSource::waitTillSourceEnabled().


Member Data Documentation

internal condition representation

Definition at line 56 of file ConditionalVariable.h.

Referenced by ConditionalVariable(), signal(), wait(), and ~ConditionalVariable().


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

Generated on 18 Jan 2013 for Fesa by  doxygen 1.6.1