summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/Channel.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2006-11-08 17:07:44 +0000
committerAlan Conway <aconway@apache.org>2006-11-08 17:07:44 +0000
commit5be658a8817b8092a7b53b116f622412a5d0aef6 (patch)
treebbee363911f47bad6abe245629cacba0ebf3b9be /cpp/src/qpid/broker/Channel.cpp
parent85fef3d1e669b240deae82cdd353620667a85e08 (diff)
downloadqpid-python-5be658a8817b8092a7b53b116f622412a5d0aef6.tar.gz
More reorg to separate APR/posix code, work in progress.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@472545 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Channel.cpp')
-rw-r--r--cpp/src/qpid/broker/Channel.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/cpp/src/qpid/broker/Channel.cpp b/cpp/src/qpid/broker/Channel.cpp
index 967c5855fa..947a97ae7c 100644
--- a/cpp/src/qpid/broker/Channel.cpp
+++ b/cpp/src/qpid/broker/Channel.cpp
@@ -105,7 +105,7 @@ void Channel::rollback(){
}
void Channel::deliver(Message::shared_ptr& msg, string& consumerTag, Queue::shared_ptr& queue, bool ackExpected){
- Locker locker(deliveryLock);
+ Mutex::ScopedLock locker(deliveryLock);
u_int64_t deliveryTag = currentDeliveryTag++;
if(ackExpected){
@@ -118,7 +118,7 @@ void Channel::deliver(Message::shared_ptr& msg, string& consumerTag, Queue::shar
}
bool Channel::checkPrefetch(Message::shared_ptr& msg){
- Locker locker(deliveryLock);
+ Mutex::ScopedLock locker(deliveryLock);
bool countOk = !prefetchCount || prefetchCount > unacked.size();
bool sizeOk = !prefetchSize || prefetchSize > msg->contentSize() + outstanding.size || unacked.empty();
return countOk && sizeOk;
@@ -191,7 +191,7 @@ void Channel::ack(u_int64_t deliveryTag, bool multiple){
//TODO: I think the outstanding prefetch size & count should be updated at this point...
//TODO: ...this may then necessitate dispatching to consumers
}else{
- Locker locker(deliveryLock);//need to synchronize with possible concurrent delivery
+ Mutex::ScopedLock locker(deliveryLock);//need to synchronize with possible concurrent delivery
ack_iterator i = find_if(unacked.begin(), unacked.end(), bind2nd(mem_fun_ref(&DeliveryRecord::matches), deliveryTag));
if(i == unacked.end()){
@@ -219,7 +219,7 @@ void Channel::ack(u_int64_t deliveryTag, bool multiple){
}
void Channel::recover(bool requeue){
- Locker locker(deliveryLock);//need to synchronize with possible concurrent delivery
+ Mutex::ScopedLock locker(deliveryLock);//need to synchronize with possible concurrent delivery
if(requeue){
outstanding.reset();
@@ -234,7 +234,7 @@ void Channel::recover(bool requeue){
bool Channel::get(Queue::shared_ptr queue, bool ackExpected){
Message::shared_ptr msg = queue->dequeue();
if(msg){
- Locker locker(deliveryLock);
+ Mutex::ScopedLock locker(deliveryLock);
u_int64_t myDeliveryTag = currentDeliveryTag++;
msg->sendGetOk(out, id, queue->getMessageCount() + 1, myDeliveryTag, framesize);
if(ackExpected){