summaryrefslogtreecommitdiff
path: root/ext/Thread/io.t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-04-03 07:06:12 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-04-03 07:06:12 +0000
commit13c6d55afa635942d3703ea1d73eb249186edfd4 (patch)
treef74beb40afa9d7242d655be2d8d4a6e799c05c53 /ext/Thread/io.t
parente336de0d01f30cc4061b6d6a00d11df30fc67cd3 (diff)
parenta1896f58c36512e60681e1b3d5e3658044b57e2d (diff)
downloadperl-13c6d55afa635942d3703ea1d73eb249186edfd4.tar.gz
[win32] integrate mainline
p4raw-id: //depot/win32/perl@865
Diffstat (limited to 'ext/Thread/io.t')
-rw-r--r--ext/Thread/io.t16
1 files changed, 15 insertions, 1 deletions
diff --git a/ext/Thread/io.t b/ext/Thread/io.t
index 8ade26504d..6012008ef5 100644
--- a/ext/Thread/io.t
+++ b/ext/Thread/io.t
@@ -1,5 +1,13 @@
use Thread;
+sub counter {
+$count = 10;
+while ($count--) {
+ sleep 1;
+ print "ping $count\n";
+}
+}
+
sub reader {
my $line;
while ($line = <STDIN>) {
@@ -17,7 +25,13 @@ finished counting down and the I/O thread has seen end-of-file on
the terminal/stdin.
EOT
-$r = new Thread \&reader;
+$r = new Thread \&counter;
+
+&reader;
+
+__END__
+
+
$count = 10;
while ($count--) {
sleep 1;