mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
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:
parent
1c036cb9f5
commit
25ffde957c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user