Instance: add base class which owns the EventLoop
This commit is contained in:
parent
9a9b6fa326
commit
07add0bd91
@ -42,9 +42,18 @@ class ClientList;
|
|||||||
struct Partition;
|
struct Partition;
|
||||||
class StateFile;
|
class StateFile;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A utility class which, when used as the first base class, ensures
|
||||||
|
* that the #EventLoop gets initialized before the other base classes.
|
||||||
|
*/
|
||||||
|
struct EventLoopHolder {
|
||||||
|
EventLoop event_loop;
|
||||||
|
};
|
||||||
|
|
||||||
struct Instance final
|
struct Instance final
|
||||||
|
: EventLoopHolder
|
||||||
#if defined(ENABLE_DATABASE) || defined(ENABLE_NEIGHBOR_PLUGINS)
|
#if defined(ENABLE_DATABASE) || defined(ENABLE_NEIGHBOR_PLUGINS)
|
||||||
:
|
,
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_DATABASE
|
#ifdef ENABLE_DATABASE
|
||||||
public DatabaseListener
|
public DatabaseListener
|
||||||
@ -56,8 +65,6 @@ struct Instance final
|
|||||||
public NeighborListener
|
public NeighborListener
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
EventLoop event_loop;
|
|
||||||
|
|
||||||
GlobalEvents::Monitor global_events;
|
GlobalEvents::Monitor global_events;
|
||||||
|
|
||||||
#ifdef ENABLE_NEIGHBOR_PLUGINS
|
#ifdef ENABLE_NEIGHBOR_PLUGINS
|
||||||
|
Loading…
Reference in New Issue
Block a user