eq::base::TimedLock Class Reference

A mutex with timeout capabilities. More...

#include <timedLock.h>

Inheritance diagram for eq::base::TimedLock:
Inheritance graph
[legend]
Collaboration diagram for eq::base::TimedLock:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TimedLock ()
 Construct a new timed lock.
 ~TimedLock ()
 Destruct the lock.
bool set (const uint32_t timeout=EQ_TIMEOUT_INDEFINITE)
 Set the lock.
void unset ()
 Release the lock.
bool trySet ()
 Attempt to set the lock.
bool isSet ()
 Test if the lock is set.

Detailed Description

A mutex with timeout capabilities.

Definition at line 31 of file timedLock.h.


Constructor & Destructor Documentation

eq::base::TimedLock::TimedLock (  ) 

Construct a new timed lock.

Version:
1.0

Definition at line 45 of file timedLock.cpp.

References EQERROR.

eq::base::TimedLock::~TimedLock (  ) 

Destruct the lock.

Version:
1.0

Definition at line 65 of file timedLock.cpp.


Member Function Documentation

bool eq::base::TimedLock::set ( const uint32_t  timeout = EQ_TIMEOUT_INDEFINITE  ) 

Set the lock.

Parameters:
timeout the timeout in milliseconds to wait for the lock, or EQ_TIMEOUT_INDEFINITE to wait indefinitely.
Returns:
true if the lock was acquired, false if not.
Version:
1.0

Definition at line 73 of file timedLock.cpp.

void eq::base::TimedLock::unset (  ) 

Release the lock.

Version:
1.0

Definition at line 116 of file timedLock.cpp.

bool eq::base::TimedLock::trySet (  ) 

Attempt to set the lock.

Returns:
true if the lock was acquired, false if not.
Version:
1.0

Definition at line 125 of file timedLock.cpp.

bool eq::base::TimedLock::isSet (  ) 

Test if the lock is set.

Returns:
true if the lock is set, false if it is not set.
Version:
1.0

Definition at line 141 of file timedLock.cpp.


The documentation for this class was generated from the following files:
Generated on Sat Feb 6 13:08:32 2010 for Equalizer 0.9.1 by  doxygen 1.6.1