[glib] Initialize service_loop before running the service thread



commit 162bafee37ccd5d58260423a8120fdcba25ecad6
Author: Chris Coulson <chris coulson canonical com>
Date:   Wed Dec 14 14:00:56 2011 +0000

    Initialize service_loop before running the service thread
    
    Bug: https://bugzilla.gnome.org/show_bug.cgi?id=666129

 gio/tests/gdbus-peer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/gdbus-peer.c b/gio/tests/gdbus-peer.c
index 7eeb59d..9ee0b08 100644
--- a/gio/tests/gdbus-peer.c
+++ b/gio/tests/gdbus-peer.c
@@ -1678,10 +1678,10 @@ codegen_test_peer (void)
   GVariant            *value;
 
   /* bring up a server - we run the server in a different thread to avoid deadlocks */
+  service_loop = NULL;
   service_thread = g_thread_new ("codegen_test_peer",
                                  codegen_service_thread_func,
                                  NULL);
-  service_loop = NULL;
   while (service_loop == NULL)
     g_thread_yield ();
   g_assert (codegen_server != NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]