From: Jerry D. Hedden Date: Mon, 16 Apr 2007 09:31:39 +0000 (-0400) Subject: Re: Thread.t hangs, even under normal test... X-Git-Tag: accepted/trunk/20130322.191538~15469 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=40c8724780d55d498f28a1a86b94645ad6ad2fef;p=platform%2Fupstream%2Fperl.git Re: Thread.t hangs, even under normal test... From: "Jerry D. Hedden" Message-ID: <1ff86f510704160631ue286a97kb66a0ce649c9aae4@mail.gmail.com> p4raw-id: //depot/perl@30967 --- diff --git a/lib/Thread.t b/lib/Thread.t index 2a0e2af..18694c5 100644 --- a/lib/Thread.t +++ b/lib/Thread.t @@ -72,9 +72,15 @@ COND_: return Thread->self->tid; } - my $thr = Thread->new(\&thr_wait); - isa_ok($thr, 'Thread'); - ok(! $thr->done(), 'Thread running'); + my $thr; + { + lock($lock); + $thr = Thread->new(\&thr_wait); + isa_ok($thr, 'Thread'); + ok(! $thr->done(), 'Thread running'); + } + yield(); + sleep(1); { lock($lock);