Commit | Line | Data |
---|---|---|
0fcb073c | 1 | BEGIN { |
2 | eval { require Config; import Config }; | |
3 | if ($@) { | |
4 | print "1..0 # Skip: no Config\n"; | |
5 | exit(0); | |
6 | } | |
0fcb073c | 7 | } |
8 | ||
609f3ea9 | 9 | use Thread; |
10 | sub foo { | |
11 | print "In foo with args: @_\n"; | |
12 | return (7, 8, 9); | |
13 | } | |
14 | ||
15 | print "Starting thread\n"; | |
16 | $t = new Thread \&foo, qw(foo bar baz); | |
17 | sleep 2; | |
18 | print "Joining with $t\n"; | |
19 | @results = $t->join(); | |
20 | print "Joining returned @results\n"; |