Update the Connect menu with vmlist.
[ovirt-viewer.git] / wui_thread.c
index 8fbd930..060c7a2 100644 (file)
@@ -243,6 +243,11 @@ wui_thread (gpointer _queue)
 
   DEBUG ("WUI thread starting up");
 
+  /* This checks wui_gthread global which is actually set in the
+   * main thread.  Of course, it might not be set if the WUI thread
+   * runs first.  Hence we yield for the main thread to run.
+   */
+  g_thread_yield ();
   ASSERT_IS_WUI_THREAD ();
 
   g_async_queue_ref (queue);