From: Jarkko Hietaniemi Date: Mon, 16 Jun 2003 06:51:19 +0000 (+0000) Subject: Instead of fancy condvar footwork do a simple join, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f123900d4e34182a0ed8e43af48cf6e0d17aab47;p=p5sagit%2Fp5-mst-13.2.git Instead of fancy condvar footwork do a simple join, as suggested by Arthur. p4raw-id: //depot/perl@19795 --- diff --git a/ext/threads/shared/t/hv_refs.t b/ext/threads/shared/t/hv_refs.t index 5ef0c05..ca9c737 100644 --- a/ext/threads/shared/t/hv_refs.t +++ b/ext/threads/shared/t/hv_refs.t @@ -86,13 +86,9 @@ ok(10, keys %foo == 0, "And make sure we realy have deleted the values"); } { my $object : shared = &share({}); - lock($object); # so that we can cond_wait threads->new(sub { - lock($object); # so that we can cond_signal bless $object, 'test1'; - cond_signal($object); # so that the parent thread waits - }); - cond_wait($object); # so that the child thread finishes + })->join; ok(15, ref($object) eq 'test1', "blessing does work"); my %test = (object => $object); ok(16, ref($test{object}) eq 'test1', "and some more work"); @@ -100,5 +96,3 @@ ok(10, keys %foo == 0, "And make sure we realy have deleted the values"); ok(17, ref($test{object}) eq 'test2', "reblessing works!"); } - -