From 25ffde957cfcaa07c44a348da61d04456865d396 Mon Sep 17 00:00:00 2001 From: Ryan Lortie Date: Wed, 7 Dec 2011 21:10:18 -0500 Subject: [PATCH] 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 file changed, 1 insertion(+) diff --git a/gio/tests/gmenumodel.c b/gio/tests/gmenumodel.c index 7d5793fa6..51d1d9315 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);