From: Gurusamy Sarathy Date: Wed, 15 Jul 1998 06:31:33 +0000 (+0000) Subject: fix thread.t ('join $t' ne '$t->join' !) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=faa19ec978675c2fae1b6983f7a664c598dbf44e;p=p5sagit%2Fp5-mst-13.2.git fix thread.t ('join $t' ne '$t->join' !) p4raw-id: //depot/perl@1503 --- diff --git a/t/lib/thread.t b/t/lib/thread.t index ae0a16e..d6f69ce 100755 --- a/t/lib/thread.t +++ b/t/lib/thread.t @@ -34,23 +34,21 @@ $t->join; sub islocked { - use attrs 'locked'; my $val = shift; my $ret; print $val; if (@_) { $ret = Thread->new(\&islocked, @_); - join $ret; + $ret->join; } } $t = new Thread \&islocked, map { "ok $_\n" } 6..10; -sleep 2; -join $t; +$t->join; # test that sleep lets other thread run $t = new Thread \&islocked,"ok 11\n"; sleep 6; print "ok 12\n"; -join $t; +$t->join;