#include <PollableQueue.h>
Public Types | |
typedef Queue::iterator | iterator |
typedef boost::function< void(const iterator &, const iterator &)> | Callback |
Callback to process a range of items. | |
Public Member Functions | |
PollableQueue (const Callback &cb) | |
When the queue is selected by the poller, values are passed to callback cb. | |
void | push (const T &t) |
Push a value onto the queue. | |
void | start (const boost::shared_ptr< sys::Poller > &poller) |
Start polling. | |
void | stop () |
Stop polling. |
Any thread can push to the queue, on wakeup the poller thread processes all items on the queue by passing them to a callback in a batch.
Definition at line 47 of file PollableQueue.h.
typedef boost::function<void (const iterator&, const iterator&)> qpid::cluster::PollableQueue< T >::Callback |
qpid::cluster::PollableQueue< T >::PollableQueue | ( | const Callback & | cb | ) | [inline, explicit] |
When the queue is selected by the poller, values are passed to callback cb.
Definition at line 82 of file PollableQueue.h.
void qpid::cluster::PollableQueue< T >::push | ( | const T & | t | ) | [inline] |
void qpid::cluster::PollableQueue< T >::start | ( | const boost::shared_ptr< sys::Poller > & | poller | ) | [inline] |
void qpid::cluster::PollableQueue< T >::stop | ( | ) | [inline] |