blob: db9e21989e791744aa2086bf9e56b97444974bd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
BEGIN {
eval { require Config; import Config };
if ($@) {
print "1..0 # Skip: no Config\n";
exit(0);
}
}
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);
print "Joining with $t\n";
@results = $t->join();
print "Joining returned ", scalar(@results), " values: @results\n";
|