ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/eg/lwp
(Generate patch)

Comparing Coro/eg/lwp (file contents):
Revision 1.5 by root, Sun Nov 5 02:18:06 2006 UTC vs.
Revision 1.6 by root, Sat Apr 14 15:06:06 2007 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines