diff options
author | Max Kellermann <max@duempel.org> | 2013-08-07 19:38:10 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-08-07 19:38:10 +0200 |
commit | 977004c3508a366499ff80ff87ac3a84b4fdf9eb (patch) | |
tree | 8aa2b14135a023454da1ea018d553471a8304a53 /src/event/DeferredMonitor.hxx | |
parent | fdc7d13ad16184c20d2bd37063cbb4d9957a4461 (diff) | |
download | mpd-977004c3508a366499ff80ff87ac3a84b4fdf9eb.tar.gz mpd-977004c3508a366499ff80ff87ac3a84b4fdf9eb.tar.xz mpd-977004c3508a366499ff80ff87ac3a84b4fdf9eb.zip |
event/DeferredMonitor: use EventLoop::AddIdle()
Diffstat (limited to '')
-rw-r--r-- | src/event/DeferredMonitor.hxx | 8 |
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(); |