ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/eg/lwp
Revision: 1.6
Committed: Sat Apr 14 15:06:06 2007 UTC (17 years, 2 months ago) by root
Branch: MAIN
CVS Tags: rel-4_22, rel-4_21, rel-4_0, rel-4_3, rel-4_13, rel-4_11, rel-4_01, rel-4_03, rel-4_02, rel-3_6, rel-3_62, rel-3_63, rel-3_61, rel-4_50, rel-4_51, rel-4_4, rel-4_45, rel-4_49, rel-4_48, rel-4_1, rel-4_2, rel-4_47, rel-4_46, rel-4_7, rel-4_31, rel-4_32, rel-4_33, rel-4_34, rel-4_35, rel-4_36, rel-4_37
Changes since 1.5: +9 -8 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 #!/usr/bin/perl
2    
3     use Coro;
4     use Coro::Event;
5 root 1.5 use Coro::LWP; # should be use'd as early as possible
6 root 1.1 use LWP::Simple;
7    
8 root 1.3 $SIG{PIPE} = 'IGNORE';
9    
10 root 1.6 my @pids;
11    
12     push @pid, async {
13     print "starting to fetch http://www.google.de/\n";
14 root 1.4 get "http://www.google.de/";
15 root 1.6 print "fetched http://www.google.de/\n";
16 root 1.4 };
17    
18 root 1.6 push @pid, async {
19     print "starting to fetch http://www.yahoo.com/\n";
20 root 1.4 get "http://www.yahoo.com/";
21 root 1.6 print "fetched http://www.yahoo.com/\n";
22 root 1.1 };
23    
24 root 1.6 $_->join for @pid;
25 root 1.1