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 ()
 Constructs a new timed lock.
 ~TimedLock ()
 Destructs the lock.
bool set (const uint32_t timeout=EQ_TIMEOUT_INDEFINITE)
 Set the lock.
void unset ()
 Releases the lock.
bool trySet ()
 Attempts to set the lock.
bool test ()
 Tests if the lock is set.


Detailed Description

A mutex with timeout capabilities.

Definition at line 33 of file timedLock.h.


Constructor & Destructor Documentation

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

Constructs a new timed lock.

Definition at line 45 of file timedLock.cpp.

References EQERROR.

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

Destructs the lock.

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.

Definition at line 73 of file timedLock.cpp.

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

Attempts to set the lock.

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

Definition at line 124 of file timedLock.cpp.

bool eq::base::TimedLock::test (  ) 

Tests if the lock is set.

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

Definition at line 140 of file timedLock.cpp.


The documentation for this class was generated from the following files:
Generated on Mon Aug 10 18:58:44 2009 for Equalizer 0.9 by  doxygen 1.5.8