Author: aconway
Date: Wed Dec 10 09:39:08 2008
New Revision: 725356
URL: http://svn.apache.org/viewvc?rev=725356&view=rev
Log:
Remove un-necessary locks.
Modified:
incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
Modified: incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp?rev=725356&r1=725355&r2=725356&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp
(original)
+++ incubator/qpid/trunk/qpid/cpp/src/qpid/cluster/OutputInterceptor.cpp Wed
Dec 10 09:39:08 2008
@@ -38,14 +38,12 @@
void OutputInterceptor::send(framing::AMQFrame& f) {
parent.getCluster().checkQuorum();
- Locker l(lock);
next->send(f);
if (!parent.isCatchUp())
sent += f.encodedSize();
}
void OutputInterceptor::activateOutput() {
- Locker l(lock);
if (parent.isCatchUp())
next->activateOutput();
else {
@@ -69,7 +67,6 @@
// which tranfers frames to the codec for writing.
//
void OutputInterceptor::deliverDoOutput(size_t requested) {
- Locker l(lock);
size_t buf = next->getBuffered();
if (parent.isLocal())
writeEstimate.delivered(sent, buf); // Update the estimate.
@@ -77,7 +74,6 @@
// Run the real doOutput() till we have added the requested data or
there's nothing to output.
sent = 0;
do {
- sys::Mutex::ScopedUnlock u(lock);
moreOutput = parent.getBrokerConnection().doOutput();
} while (sent < requested && moreOutput);
sent += buf; // Include buffered data in the sent total.
@@ -94,7 +90,6 @@
// Send a doOutput request if one is not already in flight.
void OutputInterceptor::sendDoOutput() {
- // Call with lock held.
if (!parent.isLocal()) return;
doingOutput = true;
@@ -110,17 +105,14 @@
}
void OutputInterceptor::setOutputHandler(sys::ConnectionOutputHandler& h) {
- Locker l(lock);
next = &h;
}
void OutputInterceptor::close() {
- Locker l(lock);
next->close();
}
size_t OutputInterceptor::getBuffered() const {
- Locker l(lock);
return next->getBuffered();
}