diff options
Diffstat (limited to 'cpp/src/qpid/broker/QueueEvents.cpp')
-rw-r--r-- | cpp/src/qpid/broker/QueueEvents.cpp | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/cpp/src/qpid/broker/QueueEvents.cpp b/cpp/src/qpid/broker/QueueEvents.cpp index 7525e4cb76..c501a0ffbc 100644 --- a/cpp/src/qpid/broker/QueueEvents.cpp +++ b/cpp/src/qpid/broker/QueueEvents.cpp @@ -66,15 +66,14 @@ void QueueEvents::unregisterListener(const std::string& id) } } -void QueueEvents::handle(EventQueue::Queue& events) -{ +QueueEvents::EventQueue::Batch::const_iterator +QueueEvents::handle(const EventQueue::Batch& events) { qpid::sys::Mutex::ScopedLock l(lock); - while (!events.empty()) { - for (Listeners::iterator i = listeners.begin(); i != listeners.end(); i++) { - i->second(events.front()); - } - events.pop_front(); + for (EventQueue::Batch::const_iterator i = events.begin(); i != events.end(); ++i) { + for (Listeners::iterator j = listeners.begin(); j != listeners.end(); j++) + j->second(*i); } + return events.end(); } void QueueEvents::shutdown() |