diff options
author | Alan Conway <aconway@apache.org> | 2008-12-10 17:39:08 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2008-12-10 17:39:08 +0000 |
commit | 8f570e706afbf3b58bf1b85e40c0285b2fd15301 (patch) | |
tree | b1325c22f1e5332483b8807b87d37fae5b2303f8 /cpp/src/qpid/cluster/OutputInterceptor.cpp | |
parent | 7bac78cee32d55dd1e2ea06feb59563f32f9fa14 (diff) | |
download | qpid-python-8f570e706afbf3b58bf1b85e40c0285b2fd15301.tar.gz |
Remove un-necessary locks.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@725356 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/cluster/OutputInterceptor.cpp')
-rw-r--r-- | cpp/src/qpid/cluster/OutputInterceptor.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/cpp/src/qpid/cluster/OutputInterceptor.cpp b/cpp/src/qpid/cluster/OutputInterceptor.cpp index bdb6dea791..0385ffc04e 100644 --- a/cpp/src/qpid/cluster/OutputInterceptor.cpp +++ b/cpp/src/qpid/cluster/OutputInterceptor.cpp @@ -38,14 +38,12 @@ OutputInterceptor::OutputInterceptor(cluster::Connection& p, sys::ConnectionOutp 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 @@ bool OutputInterceptor::doOutput() { // 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 @@ void OutputInterceptor::deliverDoOutput(size_t requested) { // 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 @@ void OutputInterceptor::deliverDoOutput(size_t requested) { // 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::sendDoOutput() { } 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(); } |