2 eval { require Config; import Config };
4 print "1..0 # Skip: no Config\n";
7 if ($Config{extensions} !~ /\bThread\b/) {
8 print "1..0 # Skip: no use5005threads\n";
21 print "thread $num starting\n";
22 for ($i = 1; $i <= 20; $i++) {
23 print "thread $num iteration $i\n";
24 select(undef, undef, undef, rand(10)/100);
27 warn "thread $num saw non-zero level = $level\n" if $level;
29 print "thread $num has lock\n";
30 select(undef, undef, undef, rand(10)/100);
33 print "thread $num released lock\n";
37 for ($t = 1; $t <= 5; $t++) {
38 new Thread \&worker, $t;