mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-23 12:41:50 +01:00
tests: Wait for signal unsubscriptions in gdbus-test-codegen
When destroying `GDBusProxy`s in a custom `GMainContext`, the context must be iterated enough after finalisation of the proxies that any pending D-Bus traffic, and the signal subscription data, can be freed. See the documentation for `g_dbus_connection_signal_unsubscribe()`. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Fixes: #2312
This commit is contained in:
parent
0239ae7122
commit
9499aeb8bf
@ -1382,6 +1382,12 @@ check_proxies_in_thread (gpointer user_data)
|
||||
g_object_unref (thread_proxy_1);
|
||||
g_object_unref (thread_proxy_2);
|
||||
|
||||
/* Wait for the proxy signals to all be unsubscribed. */
|
||||
while (g_main_context_iteration (thread_context, FALSE))
|
||||
{
|
||||
/* Nothing needs to be done here */
|
||||
}
|
||||
|
||||
g_main_loop_unref (thread_loop);
|
||||
g_main_context_unref (thread_context);
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user