summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-15 06:31:33 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-15 06:31:33 +0000
commitfaa19ec978675c2fae1b6983f7a664c598dbf44e (patch)
tree6230a2bda86aab146d0a1134d355a4a244a2cc78 /t
parent3f5ee3026104a5258c13c354d1b62b7b5e80170d (diff)
downloadperl-faa19ec978675c2fae1b6983f7a664c598dbf44e.tar.gz
fix thread.t ('join $t' ne '$t->join' !)
p4raw-id: //depot/perl@1503
Diffstat (limited to 't')
-rwxr-xr-xt/lib/thread.t8
1 files changed, 3 insertions, 5 deletions
diff --git a/t/lib/thread.t b/t/lib/thread.t
index ae0a16e540..d6f69ce0d9 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;