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

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

Block till there are no more ScopedWaits.

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

Referenced by qpid::sys::BlockingQueue< boost::shared_ptr< FrameSet > >::close().

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

Returns the number of outstanding ScopedWaits.

Must be called with the lock held.


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

Generated on Thu May 15 22:25:03 2008 for Qpid by  doxygen 1.5.5