[glib/wip/gmenu] menu threaded test: run the mainloop after export



commit a43302bd10696ddd1c90b1489f6d1d6d478436ce
Author: Ryan Lortie <desrt desrt ca>
Date:   Wed Dec 7 21:10:18 2011 -0500

    menu threaded test: run the mainloop after export
    
    GDBusConnection now dispatches GDestroyNotify calls back to the
    mainloop.  Adding an idle to the mainloop is O(n) in the number of idles
    already there.  We therefore need to periodically empty the mainloop to
    avoid quadratic behaviour with a very large 'n'.

 gio/tests/gmenumodel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/tests/gmenumodel.c b/gio/tests/gmenumodel.c
index 7d5793f..51d1d93 100644
--- a/gio/tests/gmenumodel.c
+++ b/gio/tests/gmenumodel.c
@@ -754,6 +754,7 @@ do_export (gpointer data)
       id = g_dbus_connection_export_menu_model (bus, path, menu, &error);
       g_assert_no_error (error);
       g_dbus_connection_unexport_menu_model (bus, id);
+      while (g_main_context_iteration (NULL, FALSE));
     }
 
   g_free (path);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]