GDBusConnection: document that this object is (meant to be) thread-safe
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 21 Oct 2011 10:42:10 +0000 (11:42 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Mon, 24 Oct 2011 09:40:29 +0000 (10:40 +0100)
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661992
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: David Zeuthen <davidz@redhat.com>
gio/gdbusconnection.c

index 1b01624..76701e6 100644 (file)
  * an D-Bus client, it is often easier to use the g_bus_own_name(),
  * g_bus_watch_name() or g_dbus_proxy_new_for_bus() APIs.
  *
+ * As an exception to the usual GLib rule that a particular object must not be
+ * used by two threads at the same time, #GDBusConnection's methods may be
+ * called from any thread<footnote>
+ * <para>
+ *   This is so that g_bus_get() and g_bus_get_sync() can safely return the
+ *   same #GDBusConnection when called from any thread.
+ * </para>
+ * </footnote>.
+ *
  * Most of the ways to obtain a #GDBusConnection automatically initialize it
  * (i.e. connect to D-Bus): for instance, g_dbus_connection_new() and
  * g_bus_get(), and the synchronous versions of those methods, give you an