diff options
author | Max Kellermann <max@duempel.org> | 2014-01-04 19:31:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-04 19:31:23 +0100 |
commit | f0d3b47ad819eadf04569d6886b7aa7d06154511 (patch) | |
tree | 6276888d083341499782c80d4aeab84016c1f91d /src/event/DeferredMonitor.cxx | |
parent | bfe75335465711faae3181c5224119b23cc9d2e0 (diff) | |
download | mpd-f0d3b47ad819eadf04569d6886b7aa7d06154511.tar.gz mpd-f0d3b47ad819eadf04569d6886b7aa7d06154511.tar.xz mpd-f0d3b47ad819eadf04569d6886b7aa7d06154511.zip |
event/Loop: remove the GLib implementation
Now that the remaining known bugs in poll() implementation are fixed,
we can go on without the GLib implementation.
Diffstat (limited to 'src/event/DeferredMonitor.cxx')
-rw-r--r-- | src/event/DeferredMonitor.cxx | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/event/DeferredMonitor.cxx b/src/event/DeferredMonitor.cxx index 5f295946e..ef7a98911 100644 --- a/src/event/DeferredMonitor.cxx +++ b/src/event/DeferredMonitor.cxx @@ -24,46 +24,11 @@ void DeferredMonitor::Cancel() { -#ifdef USE_INTERNAL_EVENTLOOP loop.RemoveDeferred(*this); -#endif -#ifdef USE_GLIB_EVENTLOOP - const auto id = source_id.exchange(0); - if (id != 0) - g_source_remove(id); -#endif } void DeferredMonitor::Schedule() { -#ifdef USE_INTERNAL_EVENTLOOP loop.AddDeferred(*this); -#endif -#ifdef USE_GLIB_EVENTLOOP - const unsigned id = loop.AddIdle(Callback, this); - const auto old_id = source_id.exchange(id); - if (old_id != 0) - g_source_remove(old_id); -#endif } - -#ifdef USE_GLIB_EVENTLOOP - -void -DeferredMonitor::Run() -{ - const auto id = source_id.exchange(0); - if (id != 0) - RunDeferred(); -} - -gboolean -DeferredMonitor::Callback(gpointer data) -{ - DeferredMonitor &monitor = *(DeferredMonitor *)data; - monitor.Run(); - return false; -} - -#endif |