diff options
author | Charles Bailey <bailey@newman.upenn.edu> | 1998-03-26 10:11:50 -0500 |
---|---|---|
committer | Malcolm Beattie <mbeattie@sable.ox.ac.uk> | 1998-04-02 16:03:37 +0000 |
commit | 17f28c40fa08b585b95d4a2531b1cd975d11e986 (patch) | |
tree | a3848d6befdc55f7cc1a326e0b4b19b31ad09869 /ext/Thread | |
parent | ec2ab091f034a27dfbd7d815fad4e3e670b743e9 (diff) | |
download | perl-17f28c40fa08b585b95d4a2531b1cd975d11e986.tar.gz |
Next wave of _63 VMS patches
p4raw-id: //depot/perl@854
Diffstat (limited to 'ext/Thread')
-rw-r--r-- | ext/Thread/io.t | 16 |
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; |