GlobalEvents: expose the internal class

Move the GlobalEvents::Monitor instance into class Instance.
Eliminate all global variables.
This commit is contained in:
Max Kellermann
2016-03-05 20:14:12 +01:00
parent b4d594eeff
commit 0e87ce4680
7 changed files with 38 additions and 58 deletions

View File

@@ -22,6 +22,7 @@
#include "check.h"
#include "event/Loop.hxx"
#include "GlobalEvents.hxx"
#include "Compiler.h"
#ifdef ENABLE_NEIGHBOR_PLUGINS
@@ -36,7 +37,6 @@ class Storage;
class UpdateService;
#endif
class EventLoop;
class Error;
class ClientList;
struct Partition;
@@ -57,6 +57,8 @@ struct Instance final
{
EventLoop event_loop;
GlobalEvents::Monitor global_events;
#ifdef ENABLE_NEIGHBOR_PLUGINS
NeighborGlue *neighbors;
#endif
@@ -77,6 +79,8 @@ struct Instance final
Partition *partition;
Instance():global_events(event_loop) {}
/**
* Initiate shutdown. Wrapper for EventLoop::Break().
*/