Change 16250 by jhi@alpha on 2002/04/28 17:35:12

        Retract the cond.t part of #16249 since the nature
        of the test changed.

Affected files ...

.... //depot/perl/ext/threads/shared/t/cond.t#3 edit

Differences ...

==== //depot/perl/ext/threads/shared/t/cond.t#3 (text) ====
Index: perl/ext/threads/shared/t/cond.t
--- perl/ext/threads/shared/t/cond.t.~1~        Sun Apr 28 11:45:05 2002
+++ perl/ext/threads/shared/t/cond.t    Sun Apr 28 11:45:05 2002
@@ -1,16 +1,16 @@
 BEGIN {
     chdir 't' if -d 't';
-    @INC = qw(../lib .);
+    push @INC ,'../lib';
     require Config; import Config;
     unless ($Config{'useithreads'}) {
         print "1..0 # Skip: no threads\n";
         exit 0;
     }
-    require "test.pl";
 }
-print "1..4\n";
+print "1..5\n";
 use strict;
 
+
 use threads;
 
 use threads::shared;
@@ -18,30 +18,23 @@
 my $lock : shared;
 
 sub foo {
-    my $ret = 0;       
     lock($lock);
-    $ret += 1;
+    print "ok 1\n";
+    sleep 2;
+    print "ok 2\n";
     cond_wait($lock);
-    $ret += 2;
-    return $ret;
+    print "ok 5\n";
 }
 
 sub bar {
-    my $ret = 0;       
     lock($lock);
-    $ret += 1;
+    print "ok 3\n";
     cond_signal($lock);
-    $ret += 2;
-    return $ret;
+    print "ok 4\n";
 }
 
-my $tr1  = threads->create(\&foo);
+my $tr  = threads->create(\&foo);
 my $tr2 = threads->create(\&bar);
-my $rt1 = $tr1->join();
-my $rt2 = $tr2->join();
-ok($rt1 & 1);
-ok($rt1 & 2);
-ok($rt2 & 1);
-ok($rt2 & 2);
-
+$tr->join();
+$tr2->join();
 
End of Patch.

Reply via email to