|
Squid Web Cache master
|
#include <event.h>
Public Types | |
| enum | CheckError { EVENT_IDLE = -1 , EVENT_ERROR = -2 } |
Public Member Functions | |
| EventScheduler () | |
| ~EventScheduler () override | |
| void | cancel (EVH *func, void *arg) |
| void | clean () |
| int | timeRemaining () const |
| void | dump (Packable *) |
| bool | find (EVH *func, void *arg) |
| void | schedule (const char *name, EVH *func, void *arg, double when, int weight, bool cbdata=true) |
| int | checkEvents (int timeout) override |
Static Public Member Functions | |
| static EventScheduler * | GetInstance () |
Private Attributes | |
| ev_entry * | tasks |
Static Private Attributes | |
| static EventScheduler | _instance |
|
inherited |
| Enumerator | |
|---|---|
| EVENT_IDLE | |
| EVENT_ERROR | |
Definition at line 26 of file AsyncEngine.h.
|
override |
| void EventScheduler::cancel | ( | EVH * | func, |
| void * | arg | ||
| ) |
Definition at line 161 of file event.cc.
References ev_entry::arg, debug_trap(), E, ev_entry::func, ev_entry::next, and tasks.
Referenced by eventDelete(), and TestEvent::testCancel().
Implements AsyncEngine.
Definition at line 216 of file event.cc.
References assert, asyncCall(), cbdataReferenceValid(), last_event_ran, ev_entry::next, ScheduleCallHere, tasks, and timeRemaining().
Referenced by TestEvent::testCancel(), TestEvent::testCheckEvents(), and TestEvent::testDump().
| void EventScheduler::clean | ( | ) |
Definition at line 250 of file event.cc.
References ev_entry::next, and tasks.
Referenced by ~EventScheduler().
| void EventScheduler::dump | ( | Packable * | out | ) |
Definition at line 261 of file event.cc.
References Packable::appendf(), cbdataReferenceValid(), current_dtime, last_event_ran, ev_entry::next, and tasks.
Referenced by eventDump(), and TestEvent::testDump().
| bool EventScheduler::find | ( | EVH * | func, |
| void * | arg | ||
| ) |
Definition at line 280 of file event.cc.
References ev_entry::arg, ev_entry::func, ev_entry::next, and tasks.
Referenced by eventFind(), and TestEvent::testFind().
|
static |
Definition at line 294 of file event.cc.
References _instance.
Referenced by StockEventLoop::StockEventLoop(), eventAdd(), eventDelete(), eventDump(), eventFind(), SquidMain(), and TestEvent::testSingleton().
| void EventScheduler::schedule | ( | const char * | name, |
| EVH * | func, | ||
| void * | arg, | ||
| double | when, | ||
| int | weight, | ||
| bool | cbdata = true |
||
| ) |
Definition at line 300 of file event.cc.
References current_dtime, debugs, E, ev_entry::next, and tasks.
Referenced by eventAdd(), TestEvent::testCancel(), TestEvent::testCheckEvents(), TestEvent::testDump(), and TestEvent::testFind().
| int EventScheduler::timeRemaining | ( | ) | const |
Definition at line 199 of file event.cc.
References current_dtime, AsyncEngine::EVENT_IDLE, max(), tasks, and ev_entry::when.
Referenced by checkEvents().
|
staticprivate |
Definition at line 67 of file event.h.
Referenced by GetInstance().
|
private |
Definition at line 68 of file event.h.
Referenced by cancel(), checkEvents(), clean(), dump(), find(), schedule(), and timeRemaining().