--------------------- PatchSet 6510 Date: 2008/01/14 22:36:32 Author: chtsanti Branch: async-calls Tag: (none) Log: Remove the old "late call avoidance" code from BodyPipe. It is not used any more Members: src/BodyPipe.cc:1.7.4.9->1.7.4.10 src/BodyPipe.h:1.5.4.3->1.5.4.4 Index: squid3/src/BodyPipe.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/BodyPipe.cc,v retrieving revision 1.7.4.9 retrieving revision 1.7.4.10 diff -u -r1.7.4.9 -r1.7.4.10 --- squid3/src/BodyPipe.cc 21 Dec 2007 15:01:14 -0000 1.7.4.9 +++ squid3/src/BodyPipe.cc 14 Jan 2008 22:36:32 -0000 1.7.4.10 @@ -121,7 +121,7 @@ BodyPipe::BodyPipe(Producer *aProducer): theBodySize(-1), theProducer(aProducer), theConsumer(0), - thePutSize(0), theGetSize(0), theCCallsPending(0), theCCallsToSkip(0), + thePutSize(0), theGetSize(0), mustAutoConsume(false), isCheckedOut(false) { // TODO: teach MemBuf to start with zero minSize @@ -246,7 +246,6 @@ if (theConsumer) { debugs(91,7, HERE << "clearing consumer" << status()); theConsumer = NULL; - theCCallsToSkip = theCCallsPending; // skip all pending consumer calls if (consumedSize() && !exhausted()) { AsyncCall::Pointer call= asyncCall(91, 7, "BodyProducer::noteBodyConsumerAborted", @@ -360,7 +359,6 @@ BodyPipe::scheduleBodyDataNotification() { if (theConsumer || mustAutoConsume) { - ++theCCallsPending; AsyncCall::Pointer call = asyncCall(91, 7, "BodyConsumer::noteMoreBodyDataAvailable", BodyConsumerDialer(theConsumer, @@ -373,7 +371,6 @@ BodyPipe::scheduleBodyEndNotification() { if (theConsumer) { - ++theCCallsPending; if (bodySizeKnown() && bodySize() == thePutSize) { AsyncCall::Pointer call = asyncCall(91, 7, "BodyConsumer::noteBodyProductionEnded", @@ -391,20 +388,6 @@ } } -// skips calls destined for the previous consumer; see BodyPipe::clearConsumer -bool BodyPipe::skipCCall() -{ - assert(theCCallsPending > 0); - --theCCallsPending; - - if (theCCallsToSkip <= 0) - return false; - - --theCCallsToSkip; - debugs(91,5, HERE << "skipped call"); - return true; -} - // a short temporary string describing buffer status for debugging const char *BodyPipe::status() const { Index: squid3/src/BodyPipe.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/BodyPipe.h,v retrieving revision 1.5.4.3 retrieving revision 1.5.4.4 diff -u -r1.5.4.3 -r1.5.4.4 --- squid3/src/BodyPipe.h 5 Dec 2007 04:42:48 -0000 1.5.4.3 +++ squid3/src/BodyPipe.h 14 Jan 2008 22:36:32 -0000 1.5.4.4 @@ -127,8 +127,6 @@ void postConsume(size_t size); void postAppend(size_t size); - bool skipCCall(); // decides whether to skip the call, updates counters - private: int64_t theBodySize; // expected total content length, if known Producer *theProducer; // content producer, if any @@ -137,9 +135,6 @@ uint64_t thePutSize; // ever-increasing total uint64_t theGetSize; // ever-increasing total - int theCCallsPending; // outstanding calls to the consumer - int theCCallsToSkip; // how many calls to the consumer we should skip - MemBuf theBuf; // produced but not yet consumed content, if any bool mustAutoConsume; // consume when there is no consumer