GNOME Bugzilla – Bug 665561
non-blocking g_bus_get variant
Last modified: 2018-05-24 13:34:16 UTC
would be nice to have a g_bus_get() variant that allowed you to get a ref on a shared bus if it already existed, or returned NULL otherwise. it would never block, and never fail, and would return immediately -- either with a GDBusConnection, or NULL. i've found myself wanting this a few times now in situations where i know that the connection already exists (and don't want to make it look like i'm doing a blocking call) or in situations where i want to behave in a certain way, or not, depending on if the bus has already been connected to.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/486.