Change 16529 by jhi@alpha on 2002/05/09 21:39:04
Subject: [PATCH ext/threads/shared/t/cond.t] Re: where threads cond.t hangs
From: Dave Mitchell <[EMAIL PROTECTED]>
Date: Thu, 9 May 2002 17:18:42 +0100
Message-ID: <[EMAIL PROTECTED]>
Affected files ...
.... //depot/perl/ext/threads/shared/t/cond.t#5 edit
Differences ...
==== //depot/perl/ext/threads/shared/t/cond.t#5 (text) ====
Index: perl/ext/threads/shared/t/cond.t
--- perl/ext/threads/shared/t/cond.t#4~16307~ Wed May 1 06:40:58 2002
+++ perl/ext/threads/shared/t/cond.t Thu May 9 14:39:04 2002
@@ -21,13 +21,14 @@
sub foo {
lock($lock);
print "ok 1\n";
- sleep 2;
- print "ok 2\n";
+ my $tr2 = threads->create(\&bar);
cond_wait($lock);
+ $tr2->join();
print "ok 5\n";
}
sub bar {
+ print "ok 2\n";
lock($lock);
print "ok 3\n";
cond_signal($lock);
@@ -35,7 +36,5 @@
}
my $tr = threads->create(\&foo);
-my $tr2 = threads->create(\&bar);
$tr->join();
-$tr2->join();
End of Patch.