mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
EventMgr: No need to be Obj
This commit is contained in:
parent
4f8a6a1dfc
commit
ebb00d37bc
2 changed files with 1 additions and 17 deletions
14
src/Event.cc
14
src/Event.cc
|
@ -145,20 +145,6 @@ void EventMgr::Drain() {
|
||||||
detail::trigger_mgr->Process();
|
detail::trigger_mgr->Process();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EventMgr::Describe(ODesc* d) const {
|
|
||||||
int n = 0;
|
|
||||||
Event* e;
|
|
||||||
for ( e = head; e; e = e->NextEvent() )
|
|
||||||
++n;
|
|
||||||
|
|
||||||
d->AddCount(n);
|
|
||||||
|
|
||||||
for ( e = head; e; e = e->NextEvent() ) {
|
|
||||||
e->Describe(d);
|
|
||||||
d->NL();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void EventMgr::Process() {
|
void EventMgr::Process() {
|
||||||
// While it semes like the most logical thing to do, we dont want
|
// While it semes like the most logical thing to do, we dont want
|
||||||
// to call Drain() as part of this method. It will get called at
|
// to call Drain() as part of this method. It will get called at
|
||||||
|
|
|
@ -50,7 +50,7 @@ private:
|
||||||
Event* next_event;
|
Event* next_event;
|
||||||
};
|
};
|
||||||
|
|
||||||
class EventMgr final : public Obj, public iosource::IOSource {
|
class EventMgr final : public iosource::IOSource {
|
||||||
public:
|
public:
|
||||||
~EventMgr() override;
|
~EventMgr() override;
|
||||||
|
|
||||||
|
@ -103,8 +103,6 @@ public:
|
||||||
|
|
||||||
int Size() const { return num_events_queued - num_events_dispatched; }
|
int Size() const { return num_events_queued - num_events_dispatched; }
|
||||||
|
|
||||||
void Describe(ODesc* d) const override;
|
|
||||||
|
|
||||||
// Let the IO loop know when there's more events to process
|
// Let the IO loop know when there's more events to process
|
||||||
// by returning a zero-timeout.
|
// by returning a zero-timeout.
|
||||||
double GetNextTimeout() override { return head ? 0.0 : -1.0; }
|
double GetNextTimeout() override { return head ? 0.0 : -1.0; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue