dtn::BlockingBundleList Class Reference

A simple derivative to the BundleList class that hooks in an oasys Notifier, which thereby allows inter-thread signalling via a pop_blocking() method. More...

#include <BundleList.h>

Inheritance diagram for dtn::BlockingBundleList:
dtn::BundleList

List of all members.

Public Member Functions

 BlockingBundleList (const std::string &name)
virtual ~BlockingBundleList ()
BundleRef pop_blocking (int timeout=-1)
 Remove (and return) the first bundle on the list, blocking (potentially limited by the given timeout) if there are none.
oasys::Notifier * notifier ()
 Accessor for the internal notifier.

Detailed Description

A simple derivative to the BundleList class that hooks in an oasys Notifier, which thereby allows inter-thread signalling via a pop_blocking() method.

This allows one thread to block until another has added a bundle to the list.

Definition at line 330 of file bundling/BundleList.h.


Constructor & Destructor Documentation

dtn::BlockingBundleList::BlockingBundleList ( const std::string &  name  ) 

Definition at line 498 of file BundleList.cc.

References dtn::BundleList::notifier_.

dtn::BlockingBundleList::~BlockingBundleList (  )  [virtual]

Definition at line 505 of file BundleList.cc.

References dtn::BundleList::notifier_.


Member Function Documentation

oasys::Notifier* dtn::BlockingBundleList::notifier (  )  [inline]

Accessor for the internal notifier.

Definition at line 348 of file bundling/BundleList.h.

References dtn::BundleList::notifier_.

Referenced by dtn::APIClient::wait_for_notify().

BundleRef dtn::BlockingBundleList::pop_blocking ( int  timeout = -1  ) 

Remove (and return) the first bundle on the list, blocking (potentially limited by the given timeout) if there are none.

Returns:
a reference to the bundle or a reference to NULL if the list is empty.

Definition at line 513 of file BundleList.cc.

References ASSERT, dtn::BundleList::empty(), dtn::BundleList::lock_, dtn::BundleList::name(), dtn::BundleList::notifier_, and dtn::BundleList::pop_front().


The documentation for this class was generated from the following files:
Generated on Sun Nov 21 11:41:01 2010 for DTN Reference Implementation by  doxygen 1.6.3