[glib] menu threaded test: run the mainloop after export
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] menu threaded test: run the mainloop after export
- Date: Thu, 8 Dec 2011 23:15:33 +0000 (UTC)
commit 25ffde957cfcaa07c44a348da61d04456865d396
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]