aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/glib-2.0/glib-2.0/60_wait-longer-for-threads-to-die.patch
blob: 4ff7b8007581ef281fe952e17ddf6782a1e5c69d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
copy from OE, said to borrow from Ubuntu. Not in glib-2.0 upstream yet. Add for sanity.
Added to poky by Kevin Tian <kevin.tian@intel.com>, 06/25/2010
Rebased for glib-2.27.3 by Dongxiao Xu <dongxiao.xu@intel.com>, 11/16/2010

Upstream-Status: Inappropriate [patches for test code]

diff -ruN glib-2.30.0-orig/tests/threadpool-test.c glib-2.30.0/tests/threadpool-test.c
--- glib-2.30.0-orig/tests/threadpool-test.c	2009-04-01 07:04:21.000000000 +0800
+++ glib-2.30.0/tests/threadpool-test.c	2010-11-16 12:28:09.002172678 +0800
@@ -5,8 +5,8 @@
 
 #include <glib.h>
 
-#define DEBUG_MSG(x)
-/* #define DEBUG_MSG(args) g_printerr args ; g_printerr ("\n");  */
+/* #define DEBUG_MSG(x) */
+#define DEBUG_MSG(args) g_printerr args ; g_printerr ("\n");
 
 #define WAIT                5    /* seconds */
 #define MAX_THREADS         10
@@ -130,10 +130,10 @@
            test_count_threads () == 0)
          break;
 
-       DEBUG_MSG (("[unused] waiting ONE second for threads to die"));
+       DEBUG_MSG (("[unused] waiting FIVE second for threads to die"));
 
        /* Some time for threads to die. */
-       g_usleep (G_USEC_PER_SEC);
+       g_usleep (5 * G_USEC_PER_SEC);
      }
 
    DEBUG_MSG (("[unused] stopped idle threads, %d remain, %d threads still exist",