aboutsummaryrefslogtreecommitdiffstats
path: root/src/event/DeferredMonitor.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-08-07 19:38:10 +0200
committerMax Kellermann <max@duempel.org>2013-08-07 19:38:10 +0200
commit977004c3508a366499ff80ff87ac3a84b4fdf9eb (patch)
tree8aa2b14135a023454da1ea018d553471a8304a53 /src/event/DeferredMonitor.hxx
parentfdc7d13ad16184c20d2bd37063cbb4d9957a4461 (diff)
downloadmpd-977004c3508a366499ff80ff87ac3a84b4fdf9eb.tar.gz
mpd-977004c3508a366499ff80ff87ac3a84b4fdf9eb.tar.xz
mpd-977004c3508a366499ff80ff87ac3a84b4fdf9eb.zip
event/DeferredMonitor: use EventLoop::AddIdle()
Diffstat (limited to '')
-rw-r--r--src/event/DeferredMonitor.hxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/event/DeferredMonitor.hxx b/src/event/DeferredMonitor.hxx
index 8a08facba..e055b6c9d 100644
--- a/src/event/DeferredMonitor.hxx
+++ b/src/event/DeferredMonitor.hxx
@@ -26,15 +26,19 @@
#include <atomic>
+class EventLoop;
+
/**
* Defer execution of an event into an #EventLoop.
*/
class DeferredMonitor {
+ EventLoop &loop;
+
std::atomic<guint> source_id;
public:
- DeferredMonitor()
- :source_id(0) {}
+ DeferredMonitor(EventLoop &_loop)
+ :loop(_loop), source_id(0) {}
~DeferredMonitor() {
Cancel();