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

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