--------------------- PatchSet 6413 Date: 2007/12/20 05:50:01 Author: rousskov Branch: async-calls Tag: (none) Log: Removed remaining CompletionDispatcher uses. The CompletionDispatcher class/files will be removed just before merging to HEAD. Members: src/EventLoop.cc:1.5.4.3->1.5.4.4 src/EventLoop.h:1.3.38.1->1.3.38.2 Index: squid3/src/EventLoop.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/EventLoop.cc,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/EventLoop.cc 19 Dec 2007 23:09:37 -0000 1.5.4.3 +++ squid3/src/EventLoop.cc 20 Dec 2007 05:50:01 -0000 1.5.4.4 @@ -1,6 +1,6 @@ /* - * $Id: EventLoop.cc,v 1.5.4.3 2007/12/19 23:09:37 rousskov Exp $ + * $Id: EventLoop.cc,v 1.5.4.4 2007/12/20 05:50:01 rousskov Exp $ * * DEBUG: section 1 Main Loop * AUTHOR: Harvest Derived @@ -82,12 +82,6 @@ } void -EventLoop::registerDispatcher(CompletionDispatcher *dispatcher) -{ - dispatchers.push_back(dispatcher); -} - -void EventLoop::registerEngine(AsyncEngine *engine) { engines.push_back(engine); @@ -116,7 +110,7 @@ waitingEngine = engines.back(); do { - // collect events into dispatchers + // generate calls and events typedef engine_vector::iterator EVI; for (EVI i = engines.begin(); i != engines.end(); ++i) { if (*i != waitingEngine) @@ -155,17 +149,11 @@ return runOnceResult; } -// dispatches calls/events accumulated during checkEngine() +// dispatches calls accumulated during checkEngine() bool EventLoop::dispatchCalls() { bool dispatchedSome = AsyncCallQueue::Instance().fire(); - - typedef dispatcher_vector::iterator DVI; - for (DVI i = dispatchers.begin(); i != dispatchers.end(); ++i) { - if ((*i)->dispatch()) - dispatchedSome = true; - } return dispatchedSome; } Index: squid3/src/EventLoop.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/EventLoop.h,v retrieving revision 1.3.38.1 retrieving revision 1.3.38.2 diff -u -r1.3.38.1 -r1.3.38.2 --- squid3/src/EventLoop.h 19 Dec 2007 19:03:06 -0000 1.3.38.1 +++ squid3/src/EventLoop.h 20 Dec 2007 05:50:01 -0000 1.3.38.2 @@ -1,6 +1,6 @@ /* - * $Id: EventLoop.h,v 1.3.38.1 2007/12/19 19:03:06 rousskov Exp $ + * $Id: EventLoop.h,v 1.3.38.2 2007/12/20 05:50:01 rousskov Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -37,7 +37,6 @@ #include "squid.h" #include "Array.h" #include "AsyncEngine.h" -#include "CompletionDispatcher.h" #include "SquidTime.h" /* An event loop. An event loop is the core inner loop of squid. @@ -52,8 +51,6 @@ public: EventLoop(); - /* register an event dispatcher to be invoked on each event loop. */ - void registerDispatcher(CompletionDispatcher *dispatcher); /* register an async engine which will be given the opportunity to perform * in-main-thread tasks each event loop. */ @@ -97,8 +94,6 @@ bool dispatchCalls(); bool last_loop; - typedef Vector dispatcher_vector; - dispatcher_vector dispatchers; typedef Vector engine_vector; engine_vector engines; TimeEngine * timeService;