[glib] GDBusConnection: Document that sockets are frobbed into non-blocking mode



commit b9e3e03767585e52771fd1faea42176138f25aa5
Author: David Zeuthen <davidz redhat com>
Date:   Thu May 12 15:36:34 2011 -0400

    GDBusConnection: Document that sockets are frobbed into non-blocking mode
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 gio/gdbusconnection.c |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index de28bad..0f9eaa0 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -675,6 +675,9 @@ g_dbus_connection_class_init (GDBusConnectionClass *klass)
    *
    * The underlying #GIOStream used for I/O.
    *
+   * If this is passed on construction and is a #GSocketConnection,
+   * then the corresponding #GSocket will be put into non-blocking mode.
+   *
    * Since: 2.26
    */
   g_object_class_install_property (gobject_class,
@@ -2363,11 +2366,8 @@ initable_init (GInitable     *initable,
   //g_debug ("haz unix fd passing powers: %d", connection->capabilities & G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING);
 
 #ifdef G_OS_UNIX
-  /* Hack used until
-   *
-   *  https://bugzilla.gnome.org/show_bug.cgi?id=616458
-   *
-   * has been resolved
+  /* We want all IO operations to be non-blocking since they happen in
+   * the worker thread which is shared by _all_ connections.
    */
   if (G_IS_SOCKET_CONNECTION (connection->stream))
     {
@@ -2467,6 +2467,9 @@ async_initable_iface_init (GAsyncInitableIface *async_initable_iface)
  * Asynchronously sets up a D-Bus connection for exchanging D-Bus messages
  * with the end represented by @stream.
  *
+ * If @stream is a #GSocketConnection, then the corresponding #GSocket
+ * will be put into non-blocking mode.
+ *
  * If @observer is not %NULL it may be used to control the
  * authentication process.
  *
@@ -2547,6 +2550,9 @@ g_dbus_connection_new_finish (GAsyncResult  *res,
  * Synchronously sets up a D-Bus connection for exchanging D-Bus messages
  * with the end represented by @stream.
  *
+ * If @stream is a #GSocketConnection, then the corresponding #GSocket
+ * will be put into non-blocking mode.
+ *
  * 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]