diff options
Diffstat (limited to 'cpp/src/qpid/broker/Queue.cpp')
-rw-r--r-- | cpp/src/qpid/broker/Queue.cpp | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/cpp/src/qpid/broker/Queue.cpp b/cpp/src/qpid/broker/Queue.cpp index acab1e06f1..40dfb80da2 100644 --- a/cpp/src/qpid/broker/Queue.cpp +++ b/cpp/src/qpid/broker/Queue.cpp @@ -307,18 +307,12 @@ void Queue::notify() Listeners copy(listeners); listeners.clear(); - - sys::ScopedLock<Guard> g(notifierLock);//prevent consumers being deleted while held in copy - { - Mutex::ScopedUnlock u(messageLock); - for_each(copy.begin(), copy.end(), mem_fun(&Consumer::notify)); - } + for_each(copy.begin(), copy.end(), mem_fun(&Consumer::notify)); } void Queue::removeListener(Consumer& c) { Mutex::ScopedLock locker(messageLock); - notifierLock.wait(messageLock);//wait until no notifies are in progress Listeners::iterator i = std::find(listeners.begin(), listeners.end(), &c); if (i != listeners.end()) listeners.erase(i); } @@ -722,27 +716,6 @@ void Queue::setExternalQueueStore(ExternalQueueStore* inst) { } } -/* - * Use of Guard requires an external lock to be held before calling - * any of its methods - */ -Queue::Guard::Guard() : count(0) {} - -void Queue::Guard::lock() -{ - count++; -} - -void Queue::Guard::unlock() -{ - if (--count == 0) condition.notifyAll(); -} - -void Queue::Guard::wait(sys::Mutex& m) -{ - while (count) condition.wait(m); -} - ManagementObject* Queue::GetManagementObject (void) const { return (ManagementObject*) mgmtObject; |