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.7 by root, Tue May 20 15:16:07 2008 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";
12 get "http://www.google.de/";
13 print "ho2\n";
14};
15 11
16async { 12for (1..1) {
17 print "hi\n"; 13 push @pid, async {
14 print "starting to fetch http://www.google.de/\n";
18 get "http://www.yahoo.com/"; 15 get "http://www.google.de/";
19 print "ho\n"; 16 print "fetched http://www.google.de/\n";
17 };
20 18
21}; 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}
22 25
23loop; 26$_->join for @pid;
24 27

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines