From f0d3b47ad819eadf04569d6886b7aa7d06154511 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 4 Jan 2014 19:31:23 +0100 Subject: 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. --- src/event/IdleMonitor.cxx | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src/event/IdleMonitor.cxx') diff --git a/src/event/IdleMonitor.cxx b/src/event/IdleMonitor.cxx index 45f533e3f..6e500aa7b 100644 --- a/src/event/IdleMonitor.cxx +++ b/src/event/IdleMonitor.cxx @@ -31,14 +31,8 @@ IdleMonitor::Cancel() if (!IsActive()) return; -#ifdef USE_INTERNAL_EVENTLOOP active = false; loop.RemoveIdle(*this); -#endif -#ifdef USE_GLIB_EVENTLOOP - g_source_remove(source_id); - source_id = 0; -#endif } void @@ -50,13 +44,8 @@ IdleMonitor::Schedule() /* already scheduled */ return; -#ifdef USE_INTERNAL_EVENTLOOP active = true; loop.AddIdle(*this); -#endif -#ifdef USE_GLIB_EVENTLOOP - source_id = loop.AddIdle(Callback, this); -#endif } void @@ -64,26 +53,8 @@ IdleMonitor::Run() { assert(loop.IsInside()); -#ifdef USE_INTERNAL_EVENTLOOP assert(active); active = false; -#endif -#ifdef USE_GLIB_EVENTLOOP - assert(source_id != 0); - source_id = 0; -#endif OnIdle(); } - -#ifdef USE_GLIB_EVENTLOOP - -gboolean -IdleMonitor::Callback(gpointer data) -{ - IdleMonitor &monitor = *(IdleMonitor *)data; - monitor.Run(); - return false; -} - -#endif -- cgit v1.2.3