From 8f570e706afbf3b58bf1b85e40c0285b2fd15301 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Wed, 10 Dec 2008 17:39:08 +0000 Subject: Remove un-necessary locks. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@725356 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/cluster/OutputInterceptor.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'cpp/src/qpid/cluster/OutputInterceptor.cpp') 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(); } -- cgit v1.2.1