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/Loop.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 '')
-rw-r--r-- | src/event/Loop.cxx | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/event/Loop.cxx b/src/event/Loop.cxx index 06e1499e7..57c966bb7 100644 --- a/src/event/Loop.cxx +++ b/src/event/Loop.cxx @@ -20,8 +20,6 @@ #include "config.h" #include "Loop.hxx" -#ifdef USE_INTERNAL_EVENTLOOP - #include "system/Clock.hxx" #include "TimeoutMonitor.hxx" #include "SocketMonitor.hxx" @@ -104,15 +102,12 @@ EventLoop::CancelTimer(TimeoutMonitor &t) } } -#endif - void EventLoop::Run() { assert(thread.IsNull()); thread = ThreadId::GetCurrent(); -#ifdef USE_INTERNAL_EVENTLOOP assert(!quit); do { @@ -180,17 +175,10 @@ EventLoop::Run() poll_result.Reset(); } while (!quit); -#endif - -#ifdef USE_GLIB_EVENTLOOP - g_main_loop_run(loop); -#endif assert(thread.IsInside()); } -#ifdef USE_INTERNAL_EVENTLOOP - void EventLoop::AddDeferred(DeferredMonitor &d) { @@ -254,39 +242,3 @@ EventLoop::OnSocketReady(gcc_unused unsigned flags) return true; } - -#endif - -#ifdef USE_GLIB_EVENTLOOP - -guint -EventLoop::AddIdle(GSourceFunc function, gpointer data) -{ - GSource *source = g_idle_source_new(); - g_source_set_callback(source, function, data, nullptr); - guint id = g_source_attach(source, GetContext()); - g_source_unref(source); - return id; -} - -GSource * -EventLoop::AddTimeout(guint interval_ms, - GSourceFunc function, gpointer data) -{ - GSource *source = g_timeout_source_new(interval_ms); - g_source_set_callback(source, function, data, nullptr); - g_source_attach(source, GetContext()); - return source; -} - -GSource * -EventLoop::AddTimeoutSeconds(guint interval_s, - GSourceFunc function, gpointer data) -{ - GSource *source = g_timeout_source_new_seconds(interval_s); - g_source_set_callback(source, function, data, nullptr); - g_source_attach(source, GetContext()); - return source; -} - -#endif |