ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/eg/lwp
Revision: 1.8
Committed: Mon Nov 24 04:56:38 2008 UTC (15 years, 7 months ago) by root
Branch: MAIN
Changes since 1.7: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# Content
1 #!/usr/bin/perl
2
3 use Coro;
4 use Coro::AnyEvent;
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 for (1..1) {
13 push @pid, async {
14 print "starting to fetch http://www.google.de/\n";
15 get "http://www.google.de/";
16 print "fetched http://www.google.de/\n";
17 };
18
19 push @pid, async {
20 print "starting to fetch http://www.yahoo.com/\n";
21 get "http://www.yahoo.com/";
22 print "fetched http://www.yahoo.com/\n";
23 };
24 }
25
26 $_->join for @pid;
27