summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/ExchangeRegistry.cpp
diff options
context:
space:
mode:
authorCarl C. Trieloff <cctrieloff@apache.org>2007-07-05 16:19:05 +0000
committerCarl C. Trieloff <cctrieloff@apache.org>2007-07-05 16:19:05 +0000
commita48c9eddce4cbc56521fca7fd64582d9dafe1d40 (patch)
tree923b6677edb1754a4a9a89c5ff0b9e2a8cc28439 /cpp/src/qpid/broker/ExchangeRegistry.cpp
parent18fc5427470dbe4bfd0e9927beb7b0cc5fe01bfc (diff)
downloadqpid-python-a48c9eddce4cbc56521fca7fd64582d9dafe1d40.tar.gz
- 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
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);