X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=wui_thread.c;fp=wui_thread.c;h=060c7a24e54e167f65dee5a995e3a366a94b5d39;hb=53c851e51c855a0493481881807d6fd8777cda93;hp=8fbd9305274a7eee9c0d6bb9cf91a988cb2aad2c;hpb=432ef642869fbbac2d6f6d111d80137cc5e7b119;p=ovirt-viewer.git diff --git a/wui_thread.c b/wui_thread.c index 8fbd930..060c7a2 100644 --- a/wui_thread.c +++ b/wui_thread.c @@ -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);