[Gd-chatter] r11135 - trunk/libraries/programming-tools/multi-thread-test

hannes at gwydiondylan.org hannes at gwydiondylan.org
Tue Jan 16 02:18:10 CET 2007


Author: hannes
Date: Tue Jan 16 02:18:08 2007
New Revision: 11135

Modified:
   trunk/libraries/programming-tools/multi-thread-test/multi-thread-test.dylan
Log:
Job: minor
*actually, this bug happen on linux with harp-cg, using
 boehm-gc or mps as gc. I was also able to reproduce (probably)
 the same bug with the c-back-end on linux.
*since no thread is discontinued, it's sometimes harder
 to reproduce (after ~320 threads opendylan can no longer
 open threads with mps) but it probably shows that
 thread creation has a race condition
*this can be reproduced with
 gdb ~hannes/bin/multi-thread-test
on leibniz


Modified: trunk/libraries/programming-tools/multi-thread-test/multi-thread-test.dylan
==============================================================================
--- trunk/libraries/programming-tools/multi-thread-test/multi-thread-test.dylan	(original)
+++ trunk/libraries/programming-tools/multi-thread-test/multi-thread-test.dylan	Tue Jan 16 02:18:08 2007
@@ -24,9 +24,14 @@
   format-out("Hello from %d\n",count);
   //collect-garbage();
   //sleep(1);
+  format-out("Hello from %d\n",count);
   with-lock (ts.lock)
     remove!(ts.threads, count)
   end;
+  format-out("End from %d\n",count);
+  while (#t)
+    sleep(2300)
+  end;
 end;
 
 define function main () => ()



More information about the chatter mailing list