Initial check-in of Thread module.
[p5sagit/p5-mst-13.2.git] / io.t
1 use Thread;
2
3 sub reader {
4     my $line;
5     while ($line = <STDIN>) {
6         print "reader: $line";
7     }
8     print "End of input in reader\n";
9     return 0;
10 }
11
12 $r = new Thread \&reader;
13 $count = 20;
14 while ($count--) {
15     sleep 1;
16     print "ping $count\n";
17 }
18
19