summaryrefslogtreecommitdiffstats
path: root/contrib/perl5/ext/Thread/join2.t
blob: 99b43a54dc548de6e6c933a6c00f2f2f9f8e8255 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use Thread;
sub foo {
    print "In foo with args: @_\n";
    return (7, 8, 9);
}

print "Starting thread\n";
$t = new Thread \&foo, qw(foo bar baz);
sleep 2;
print "Joining with $t\n";
@results = $t->join();
print "Joining returned @results\n";
OpenPOWER on IntegriCloud