threads::shared 1.22
[p5sagit/p5-mst-13.2.git] / ext / threads / shared / t / cond.t
index b60f217..3a6bfdf 100644 (file)
@@ -8,7 +8,7 @@ BEGIN {
     }
     use Config;
     if (! $Config{'useithreads'}) {
-        print("1..0 # Skip: Perl not compiled with 'useithreads'\n");
+        print("1..0 # SKIP Perl not compiled with 'useithreads'\n");
         exit(0);
     }
 }
@@ -142,6 +142,7 @@ $Base++;
     $Base += 4;
 }
 
+
 # test cond_signal()
 {
     my $lock : shared;
@@ -192,7 +193,6 @@ $Base++;
     $tr->join();
 
     $Base += 5;
-
 }
 
 
@@ -212,7 +212,7 @@ $Base++;
             lock($counter);
             if ($n > 0) {
                 $counter++;
-                $th = threads->new(\&broad, $n-1);
+                $th = threads->create(\&broad, $n-1);
                 cond_wait($counter);
                 $counter += 10;
             }
@@ -224,7 +224,7 @@ $Base++;
         $th->join if $th;
     }
 
-    threads->new(\&broad, 3)->join;
+    threads->create(\&broad, 3)->join;
     ok(2, $counter == 33, "cond_broadcast: all three threads woken");
 
     $Base += 2;
@@ -243,7 +243,7 @@ $Base++;
             lock($r);
             if ($n > 0) {
                 $$r++;
-                $th = threads->new(\&broad2, $n-1);
+                $th = threads->create(\&broad2, $n-1);
                 cond_wait($r);
                 $$r += 10;
             }
@@ -255,11 +255,10 @@ $Base++;
         $th->join if $th;
     }
 
-    threads->new(\&broad2, 3)->join;;
+    threads->create(\&broad2, 3)->join;;
     ok(2, $$r == 33, "cond_broadcast: ref: all three threads woken");
 
     $Base += 2;
-
 }
 
 
@@ -280,7 +279,9 @@ $Base++;
     cond_broadcast($lock);
     ok(4, $warncount == 2, 'get no warning on cond_broadcast');
 
-    #$Base += 4;
+    $Base += 4;
 }
 
+exit(0);
+
 # EOF