#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 |
Detailed Description
Member Enumeration Documentation
◆ CheckError
|
inherited |
Enumerator | |
---|---|
EVENT_IDLE | |
EVENT_ERROR |
Definition at line 26 of file AsyncEngine.h.
Constructor & Destructor Documentation
◆ EventScheduler()
◆ ~EventScheduler()
|
override |
Member Function Documentation
◆ cancel()
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, and tasks.
Referenced by eventDelete(), and TestEvent::testCancel().
◆ checkEvents()
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().
◆ clean()
void EventScheduler::clean | ( | ) |
Definition at line 250 of file event.cc.
References ev_entry::next, and tasks.
Referenced by ~EventScheduler().
◆ dump()
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().
◆ find()
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().
◆ GetInstance()
|
static |
Definition at line 294 of file event.cc.
References _instance.
Referenced by StockEventLoop::StockEventLoop(), eventAdd(), eventDelete(), eventDump(), eventFind(), SquidMain(), and TestEvent::testSingleton().
◆ schedule()
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, and tasks.
Referenced by eventAdd(), TestEvent::testCancel(), TestEvent::testCheckEvents(), TestEvent::testDump(), and TestEvent::testFind().
◆ timeRemaining()
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().
Member Data Documentation
◆ _instance
|
staticprivate |
Definition at line 67 of file event.h.
Referenced by GetInstance().
◆ tasks
|
private |
Definition at line 68 of file event.h.
Referenced by cancel(), checkEvents(), clean(), dump(), find(), schedule(), and timeRemaining().
The documentation for this class was generated from the following files: