diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2007-04-16 05:31:39 -0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-04-16 13:37:05 +0000 |
commit | 40c8724780d55d498f28a1a86b94645ad6ad2fef (patch) | |
tree | bc6bc9690c344fd0b04b40a5a59612c0ee630ab3 /lib/Thread.t | |
parent | d67b3c531d944f9ee452b5a153cdcd586d782ca6 (diff) | |
download | perl-40c8724780d55d498f28a1a86b94645ad6ad2fef.tar.gz |
Re: Thread.t hangs, even under normal test...
From: "Jerry D. Hedden" <jdhedden@gmail.com>
Message-ID: <1ff86f510704160631ue286a97kb66a0ce649c9aae4@mail.gmail.com>
p4raw-id: //depot/perl@30967
Diffstat (limited to 'lib/Thread.t')
-rw-r--r-- | lib/Thread.t | 12 |
1 files changed, 9 insertions, 3 deletions
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); |