[Nice] [nice/master] race condition where the whole thing finishes up before g_main_loop_run(error_loop) gets called, so it gets stuck.. so we need to delay all threads by a little...

Youness Alaoui youness.alaoui at collabora.co.uk
Wed Nov 12 15:21:33 PST 2008


---
 agent/test-thread.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/agent/test-thread.c b/agent/test-thread.c
index 201151c..56b446c 100644
--- a/agent/test-thread.c
+++ b/agent/test-thread.c
@@ -42,6 +42,7 @@
 
 #include <stdlib.h>
 #include <string.h>
+#include <unistd.h>
 
 GMainLoop *error_loop;
 
@@ -66,6 +67,7 @@ mainloop_thread (gpointer data)
 {
   GMainLoop *loop = data;
 
+  usleep (100000);
   g_main_loop_run (loop);
 
   return NULL;
-- 
1.5.6.5




More information about the Nice mailing list