[glib/glib-2-30] GDBusConnection: warn that direct access to the stream is a bad idea
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-30] GDBusConnection: warn that direct access to the stream is a bad idea
- Date: Mon, 17 Oct 2011 11:33:37 +0000 (UTC)
commit 6d57a45234daa51d837695a9325c1b71cae101cf
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Thu Oct 13 17:39:03 2011 +0100
GDBusConnection: warn that direct access to the stream is a bad idea
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=661679
Signed-off-by: Simon McVittie <simon mcvittie collabora co uk>
Reviewed-by: David Zeuthen <davidz redhat com>
gio/gdbusconnection.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index 35d6cf6..bf75788 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -671,6 +671,10 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
* If this is passed on construction and is a #GSocketConnection,
* then the corresponding #GSocket will be put into non-blocking mode.
*
+ * While the #GDBusConnection is active, it will interact with this
+ * stream from a worker thread, so it is not safe to interact with
+ * the stream directly.
+ *
* Since: 2.26
*/
g_object_class_install_property (gobject_class,
@@ -946,6 +950,10 @@ g_dbus_connection_init (GDBusConnection *connection)
*
* Gets the underlying stream used for IO.
*
+ * While the #GDBusConnection is active, it will interact with this
+ * stream from a worker thread, so it is not safe to interact with
+ * the stream directly.
+ *
* Returns: (transfer none): the stream used for IO
*
* Since: 2.26
@@ -2503,6 +2511,10 @@ async_initable_iface_init (GAsyncInitableIface *async_initable_iface)
* If @stream is a #GSocketConnection, then the corresponding #GSocket
* will be put into non-blocking mode.
*
+ * The D-Bus connection will interact with @stream from a worker thread.
+ * As a result, the caller should not interact with @stream after this
+ * method has been called, except by calling g_object_unref() on it.
+ *
* If @observer is not %NULL it may be used to control the
* authentication process.
*
@@ -2586,6 +2598,10 @@ g_dbus_connection_new_finish (GAsyncResult *res,
* If @stream is a #GSocketConnection, then the corresponding #GSocket
* will be put into non-blocking mode.
*
+ * The D-Bus connection will interact with @stream from a worker thread.
+ * As a result, the caller should not interact with @stream after this
+ * method has been called, except by calling g_object_unref() on it.
+ *
* If @observer is not %NULL it may be used to control the
* authentication process.
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]