cwidget::threads::condition Class Reference

A abstraction over conditions. More...

#include <threads.h>

List of all members.

Public Member Functions

void wake_one ()
void wake_all ()
template<typename Lock>
void wait (const Lock &l)
 Wait with the given guard (should be a lock type that is a friend of this condition object).
template<typename Lock, typename Pred>
void wait (const Lock &l, Pred p)
 Wait until the given predicate returns true.
template<typename Lock>
bool timed_wait (const Lock &l, const timespec &until)
 Wait until either the condition is signalled or until the given time.
template<typename Lock, typename Pred>
bool timed_wait (const Lock &l, const timespec &until, const Pred &p)
 Wait either until the condition is signalled while the given predicate is true or until the given time.


Detailed Description

A abstraction over conditions.

When a condition variable is destroyed, any threads that are still blocked on it are woken up.


Member Function Documentation

template<typename Lock>
bool cwidget::threads::condition::timed_wait ( const Lock &  l,
const timespec &  until 
) [inline]

Wait until either the condition is signalled or until the given time.

Parameters:
l the guard of the condition
until the time at which the wait should terminate
Returns:
true if the condition occurred or false if time ran out.


The documentation for this class was generated from the following file:
Generated on Fri Nov 16 03:33:05 2007 for cwidget by  doxygen 1.5.1