qpid::sys::Waitable Class Reference

A monitor that keeps track of waiting threads. More...

#include <Waitable.h>

Inheritance diagram for qpid::sys::Waitable:

Inheritance graph
[legend]
Collaboration diagram for qpid::sys::Waitable:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void waitWaiters ()
 Block till there are no more ScopedWaits.
size_t hasWaiters ()
 Returns the number of outstanding ScopedWaits.

Classes

struct  ScopedWait
 Use this inside a scoped lock around the call to Monitor::wait to be counted as a waiter. More...

Detailed Description

A monitor that keeps track of waiting threads.

Threads declare a ScopedWait around wait() inside a ScopedLock to be considered waiters.


Member Function Documentation

size_t qpid::sys::Waitable::hasWaiters (  )  [inline]

Returns the number of outstanding ScopedWaits.

Must be called with the lock held.

void qpid::sys::Waitable::waitWaiters (  )  [inline]

Block till there are no more ScopedWaits.

Precondition:
Must be called inside a ScopedLock but NOT a ScopedWait.


The documentation for this class was generated from the following file:
Generated on Thu Apr 10 11:09:12 2008 for Qpid by  doxygen 1.4.7