Threads can start executing in a different order than they were
Artur Bergman [Wed, 26 Sep 2001 11:06:50 +0000 (11:06 +0000)]
created.... so we cannot ok() inside the threadstarter.

p4raw-id: //depot/perl@12227

ext/threads/t/stress_string.t

index 369858e..fb87c6c 100644 (file)
@@ -35,11 +35,11 @@ ok(2,1,"");
 
 sub test9 {
   my $i = shift;
-  ok($i,1,"Multiple thread test");
   for(1..20000) { $i++};
 }
 my @threads;
 for(3..33) {
+  ok($_,1,"Multiple thread test");
   push @threads ,threads->create('test9',$_);
 }
 sleep 1;