An event loop. An event loop is the core inner loop of squid. The event loop can be run until exit, or once. After it finishes control returns to the caller. If desired it can be run again.
- The event loop cannot be run once it is running until it has finished.
Definition at line 25 of file EventLoop.h.
run the loop once. This may not complete all events! It should therefor be used with care. TODO: signal in runOnce whether or not the loop is over - IDLE vs OK vs TIMEOUT?
Definition at line 89 of file EventLoop.cc.
References checkEngine(), DBG_CRITICAL, debugs, dispatchCalls(), engines, errcount, error, EVENT_LOOP_TIMEOUT, i, last_loop, loop_delay, NULL, primaryEngine, runOnceResult, TimeEngine::tick(), and timeService.
Referenced by RecordingEngine::checkEvents(), run(), testEventLoop::testSetPrimaryEngine(), testEventLoop::testSetTimeService(), and testUfs::testUfsSearch().
set the primary async engine. The primary async engine recieves the lowest requested timeout gathered from the other engines each loop. (There is a default of 10ms if all engines are idle or request higher delays). If no primary has been nominated, the last async engine added is implicitly the default.
Definition at line 149 of file EventLoop.cc.
References engines, fatal(), i, and primaryEngine.
Referenced by SquidMain(), and testEventLoop::testSetPrimaryEngine().