]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: Delayed reads could get lost if they where assigned to a DelayVector.
authorrobertc <>
Thu, 15 May 2003 13:06:24 +0000 (13:06 +0000)
committerrobertc <>
Thu, 15 May 2003 13:06:24 +0000 (13:06 +0000)
Keywords:

Delayed reads could get lost if they where assigned to a DelayVector.

src/DelayVector.cc
src/DelayVector.h

index 882d88a4de18bb9873c4bd8fcedc16b01837777f..0d48b6c078ea3161d6be9a8d4586a3bb06746902 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: DelayVector.cc,v 1.5 2003/03/10 20:12:43 robertc Exp $
+ * $Id: DelayVector.cc,v 1.6 2003/05/15 07:06:24 robertc Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: Robert Collins <robertc@squid-cache.org>
@@ -64,8 +64,15 @@ DelayVector::deleteSelf() const
     delete this;
 }
 
+DelayVector::DelayVector()
+{
+    DelayPools::RegisterForUpdates (this);
+}
+
 DelayVector::~DelayVector()
-{}
+{
+    DelayPools::DeregisterForUpdates (this);
+}
 
 void
 DelayVector::stats(StoreEntry * sentry)
@@ -92,12 +99,10 @@ DelayVector::dump(StoreEntry *entry) const
 void
 DelayVector::update(int incr)
 {
-    iterator pos = pools.begin();
-
-    while (pos != pools.end()) {
-        (*pos)->update(incr);
-        ++pos;
-    }
+    /*
+     * Each pool updates itself,
+     * but we may have deferred reads waiting on the pool as a whole.
+     */
 
     kickReads();
 }
index 5dc21a84c2912eb263ee87cf91ea0fd18e17a1ad..d6d96c1665ddacf565cc176c6591eb4985a22d27 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: DelayVector.h,v 1.5 2003/03/06 11:51:55 robertc Exp $
+ * $Id: DelayVector.h,v 1.6 2003/05/15 07:06:24 robertc Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -46,6 +46,7 @@ public:
     void *operator new(size_t);
     void operator delete (void *);
     virtual void deleteSelf() const;
+    DelayVector();
     virtual ~DelayVector();
     virtual void stats(StoreEntry * sentry);
     virtual void dump(StoreEntry *entry) const;