#include <BundleList.h>
This allows one thread to block until another has added a bundle to the list.
Definition at line 285 of file BundleList.h.
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. |
dtn::BlockingBundleList::BlockingBundleList | ( | const std::string & | name | ) |
Definition at line 476 of file BundleList.cc.
References oasys::Logger::logpath_, and dtn::BundleList::notifier_.
dtn::BlockingBundleList::~BlockingBundleList | ( | ) | [virtual] |
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.
Remove (and return) the first bundle on the list, blocking if there are none.
Definition at line 496 of file BundleList.cc.
References ASSERT, oasys::Lock::is_locked_by_me(), dtn::BundleList::list_, oasys::SpinLock::lock(), dtn::BundleList::lock_, log_debug, dtn::BundleList::name_, dtn::BundleList::notifier_, dtn::BundleList::pop_front(), oasys::SpinLock::unlock(), and oasys::Notifier::wait().
oasys::Notifier* dtn::BlockingBundleList::notifier | ( | ) | [inline] |
Accessor for the internal notifier.
Definition at line 303 of file BundleList.h.
References dtn::BundleList::notifier_.
Referenced by dtn::APIClient::wait_for_bundle().