From a48c9eddce4cbc56521fca7fd64582d9dafe1d40 Mon Sep 17 00:00:00 2001 From: "Carl C. Trieloff" Date: Thu, 5 Jul 2007 16:19:05 +0000 Subject: - Added RW lock - Updated all exchanges to us RW lock - Updated all registries to us RW lock - Still need to do (client, channel, message and queues) git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@553549 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/broker/TopicExchange.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cpp/src/qpid/broker/TopicExchange.cpp') diff --git a/cpp/src/qpid/broker/TopicExchange.cpp b/cpp/src/qpid/broker/TopicExchange.cpp index 80c207b56a..99c0d381c5 100644 --- a/cpp/src/qpid/broker/TopicExchange.cpp +++ b/cpp/src/qpid/broker/TopicExchange.cpp @@ -120,7 +120,7 @@ TopicExchange::TopicExchange(const std::string& _name, bool _durable, const Fiel bool TopicExchange::bind(Queue::shared_ptr queue, const string& routingKey, const FieldTable* /*args*/){ - Monitor::ScopedLock l(lock); + RWlock::ScopedWlock l(lock); TopicPattern routingPattern(routingKey); if (isBound(queue, routingPattern)) { return false; @@ -131,7 +131,7 @@ bool TopicExchange::bind(Queue::shared_ptr queue, const string& routingKey, cons } bool TopicExchange::unbind(Queue::shared_ptr queue, const string& routingKey, const FieldTable* /*args*/){ - Monitor::ScopedLock l(lock); + RWlock::ScopedWlock l(lock); BindingMap::iterator bi = bindings.find(TopicPattern(routingKey)); Queue::vector& qv(bi->second); if (bi == bindings.end()) return false; @@ -151,7 +151,7 @@ bool TopicExchange::isBound(Queue::shared_ptr queue, TopicPattern& pattern) } void TopicExchange::route(Deliverable& msg, const string& routingKey, const FieldTable* /*args*/){ - Monitor::ScopedLock l(lock); + RWlock::ScopedRlock l(lock); for (BindingMap::iterator i = bindings.begin(); i != bindings.end(); ++i) { if (i->first.match(routingKey)) { Queue::vector& qv(i->second); -- cgit v1.2.1