5 sub single_file : locked {
9 print "Uh oh: $who entered while locked by $global\n" if $global;
12 for ($i = 0; $i < int(10 * rand); $i++) {
14 select(undef, undef, undef, 0.1);
22 for ($j = 0; $j < 10; $j++) {
24 for ($i = 0; $i < int(10 * rand); $i++) {
26 select(undef, undef, undef, 0.1);
33 for ($j = 0; $j < 10; $j++) {
35 for ($i = 0; $i < int(10 * rand); $i++) {
37 select(undef, undef, undef, 0.1);
44 for ($j = 0; $j < 10; $j++) {
46 for ($i = 0; $i < int(10 * rand); $i++) {
48 select(undef, undef, undef, 0.1);
57 Each pair of square brackets [...] should contain a repeated sequence of
58 a unique upper case letter. Lower case letters may appear randomly both
59 in and out of the brackets.
61 $foo = new Thread \&start_a;
62 $bar = new Thread \&start_b;
63 $baz = new Thread \&start_c;
64 print "\nmain: joining...\n";