summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/ExchangeRegistry.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/broker/ExchangeRegistry.cpp')
-rw-r--r--cpp/src/qpid/broker/ExchangeRegistry.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/src/qpid/broker/ExchangeRegistry.cpp b/cpp/src/qpid/broker/ExchangeRegistry.cpp
index 9555fa43a4..732d45dc44 100644
--- a/cpp/src/qpid/broker/ExchangeRegistry.cpp
+++ b/cpp/src/qpid/broker/ExchangeRegistry.cpp
@@ -38,7 +38,7 @@ pair<Exchange::shared_ptr, bool> ExchangeRegistry::declare(const string& name, c
pair<Exchange::shared_ptr, bool> ExchangeRegistry::declare(const string& name, const string& type,
bool durable, const FieldTable& args)
throw(UnknownExchangeTypeException){
- Mutex::ScopedLock locker(lock);
+ RWlock::ScopedWlock locker(lock);
ExchangeMap::iterator i = exchanges.find(name);
if (i == exchanges.end()) {
Exchange::shared_ptr exchange;
@@ -62,7 +62,7 @@ pair<Exchange::shared_ptr, bool> ExchangeRegistry::declare(const string& name, c
}
void ExchangeRegistry::destroy(const string& name){
- Mutex::ScopedLock locker(lock);
+ RWlock::ScopedWlock locker(lock);
ExchangeMap::iterator i = exchanges.find(name);
if (i != exchanges.end()) {
exchanges.erase(i);
@@ -70,7 +70,7 @@ void ExchangeRegistry::destroy(const string& name){
}
Exchange::shared_ptr ExchangeRegistry::get(const string& name){
- Mutex::ScopedLock locker(lock);
+ RWlock::ScopedRlock locker(lock);
ExchangeMap::iterator i = exchanges.find(name);
if (i == exchanges.end())
throw ChannelException(404, "Exchange not found:" + name);