From 40c8724780d55d498f28a1a86b94645ad6ad2fef Mon Sep 17 00:00:00 2001 From: "Jerry D. Hedden" Date: Mon, 16 Apr 2007 05:31:39 -0400 Subject: Re: Thread.t hangs, even under normal test... From: "Jerry D. Hedden" Message-ID: <1ff86f510704160631ue286a97kb66a0ce649c9aae4@mail.gmail.com> p4raw-id: //depot/perl@30967 --- lib/Thread.t | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'lib/Thread.t') diff --git a/lib/Thread.t b/lib/Thread.t index 2a0e2af5af..18694c5b98 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); -- cgit v1.2.1