This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Rename the old non-standard threads tests so that
[perl5.git] / ext / Thread / join2.tx
1 BEGIN {
2     eval { require Config; import Config };
3     if ($@) {
4         print "1..0 # Skip: no Config\n";
5         exit(0);
6     }
7     if ($Config{extensions} !~ /\bThread\b/) {
8         print "1..0 # Skip: no use5005threads\n";
9         exit(0);
10     }
11 }
12
13 use Thread;
14 sub foo {
15     print "In foo with args: @_\n";
16     return (7, 8, 9);
17 }
18
19 print "Starting thread\n";
20 $t = new Thread \&foo, qw(foo bar baz);
21 sleep 2;
22 print "Joining with $t\n";
23 @results = $t->join();
24 print "Joining returned @results\n";