TAO 3.1.4
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TAO_Condition< MUTEX > Class Template Reference

Same as to the ACE_Condition variable wrapper. More...

#include <Condition.h>

Public Types

typedef MUTEX LOCK
 Useful typedef.
 

Public Member Functions

 TAO_Condition (MUTEX &m)
 Initialize the condition variable.
 
 TAO_Condition ()
 
 ~TAO_Condition ()
 Implicitly destroy the condition variable.
 
int wait (const ACE_Time_Value *abstime)
 
int wait ()
 Block on condition.
 
int wait (MUTEX &mutex, const ACE_Time_Value *abstime=0)
 
int signal ()
 Signal one waiting thread.
 
int broadcast ()
 Signal all waiting threads.
 
int remove ()
 Explicitly destroy the condition variable.
 
MUTEX * mutex ()
 Returns a reference to the underlying mutex_;.
 

Private Member Functions

 TAO_Condition (const TAO_Condition< MUTEX > &)=delete
 
TAO_Conditionoperator= (const TAO_Condition< MUTEX > &)=delete
 

Private Attributes

MUTEX * mutex_
 Reference to mutex lock.
 
bool delete_lock_
 A flag to indicate whether the lock needs to be deleted.
 
TAO_SYNCH_CONDITIONcond_
 Condition variable.
 

Detailed Description

template<class MUTEX>
class TAO_Condition< MUTEX >

Same as to the ACE_Condition variable wrapper.

This class differs from ACE_Condition in that it uses a TAO_SYNCH_CONDITION instead of ACE_cond_t under the hood to provide blocking.

Member Typedef Documentation

◆ LOCK

template<class MUTEX >
typedef MUTEX TAO_Condition< MUTEX >::LOCK

Useful typedef.

Constructor & Destructor Documentation

◆ TAO_Condition() [1/3]

template<class MUTEX >
TAO_Condition< MUTEX >::TAO_Condition ( MUTEX & m)

Initialize the condition variable.

◆ TAO_Condition() [2/3]

template<class MUTEX >
TAO_Condition< MUTEX >::TAO_Condition ( )

A default constructor. Since no lock is provided by the user, one will be created internally.

◆ ~TAO_Condition()

template<class MUTEX >
TAO_Condition< MUTEX >::~TAO_Condition ( )

Implicitly destroy the condition variable.

◆ TAO_Condition() [3/3]

template<class MUTEX >
TAO_Condition< MUTEX >::TAO_Condition ( const TAO_Condition< MUTEX > & )
privatedelete

Member Function Documentation

◆ broadcast()

template<class MUTEX >
int TAO_Condition< MUTEX >::broadcast ( )

Signal all waiting threads.

◆ mutex()

template<class MUTEX >
MUTEX * TAO_Condition< MUTEX >::mutex ( )

Returns a reference to the underlying mutex_;.

◆ operator=()

template<class MUTEX >
TAO_Condition & TAO_Condition< MUTEX >::operator= ( const TAO_Condition< MUTEX > & )
privatedelete

◆ remove()

template<class MUTEX >
int TAO_Condition< MUTEX >::remove ( )

Explicitly destroy the condition variable.

◆ signal()

template<class MUTEX >
int TAO_Condition< MUTEX >::signal ( )

Signal one waiting thread.

◆ wait() [1/3]

template<class MUTEX >
int TAO_Condition< MUTEX >::wait ( )

Block on condition.

◆ wait() [2/3]

template<class MUTEX >
int TAO_Condition< MUTEX >::wait ( const ACE_Time_Value * abstime)

Block on condition, or until absolute time-of-day has passed. If abstime == 0 use "blocking" <wait> semantics. Else, if <abstime> != 0 and the call times out before the condition is signaled <wait> returns -1 and sets errno to ETIME.

Peform an "alertable" timed wait. If the argument ABSTIME == 0 then we do a regular cond_wait(), else we do a timed wait for up to abstime

◆ wait() [3/3]

template<class MUTEX >
int TAO_Condition< MUTEX >::wait ( MUTEX & mutex,
const ACE_Time_Value * abstime = 0 )

Block on condition or until absolute time-of-day has passed. If abstime == 0 use "blocking" wait() semantics on the <mutex> passed as a parameter (this is useful if you need to store the <Condition> in shared memory). Else, if <abstime> != 0 and the call times out before the condition is signaled <wait> returns -1 and sets errno to ETIME.

Member Data Documentation

◆ cond_

template<class MUTEX >
TAO_SYNCH_CONDITION* TAO_Condition< MUTEX >::cond_
private

Condition variable.

◆ delete_lock_

template<class MUTEX >
bool TAO_Condition< MUTEX >::delete_lock_
private

A flag to indicate whether the lock needs to be deleted.

◆ mutex_

template<class MUTEX >
MUTEX* TAO_Condition< MUTEX >::mutex_
private

Reference to mutex lock.


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