From: Dave Mitchell Date: Thu, 9 May 2002 17:18:42 +0000 (+0100) Subject: Re: where threads cond.t hangs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7bdf8c10fbfd2931ab2e0f611e7edded494403c3;p=p5sagit%2Fp5-mst-13.2.git Re: where threads cond.t hangs Message-ID: <20020509171842.C9836@fdgroup.com> p4raw-id: //depot/perl@16529 --- diff --git a/ext/threads/shared/t/cond.t b/ext/threads/shared/t/cond.t index b757fb5..71f6012 100644 --- a/ext/threads/shared/t/cond.t +++ b/ext/threads/shared/t/cond.t @@ -21,13 +21,14 @@ my $lock : shared; 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 @@ sub bar { } my $tr = threads->create(\&foo); -my $tr2 = threads->create(\&bar); $tr->join(); -$tr2->join();