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'.
This commit is contained in:
Ryan Lortie 2011-12-07 21:10:18 -05:00
parent 1c036cb9f5
commit 25ffde957c

View File

@ -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);