2 eval { require Config; import Config };
4 print "1..0 # Skip: no Config\n";
13 sub single_file : locked {
16 print "Level $level for $arg\n";
17 print "(something is wrong)\n" if $level < 0 || $level > 1;
20 print "Back to level $level\n";
28 single_file("bar $i");
29 sleep 1 if rand > 0.5;
40 single_file("foo $i");
41 sleep 1 if rand > 0.5;
52 single_file("baz $i");
53 sleep 1 if rand > 0.5;
62 $foo = new Thread \&start_foo;
63 $bar = new Thread \&start_bar;
64 $baz = new Thread \&start_baz;
68 print "main: threads finished, exiting\n";