Revision: | 1.7 |
Committed: | Tue May 20 15:16:07 2008 UTC (16 years, 1 month ago) by root |
Branch: | MAIN |
CVS Tags: | rel-4_91, rel-5_0, rel-4_748, rel-4_8, rel-4_9, rel-4_741, rel-4_743, rel-4_742, rel-4_744, rel-4_747, rel-4_74, rel-4_71, rel-4_72, rel-4_73, rel-4_802, rel-4_803, rel-4_801, rel-4_804, rel-4_479, rel-4_745, rel-4_901, rel-4_746, rel-4_911, rel-4_912 |
Changes since 1.6: | +12 -10 lines |
Log Message: | *** empty log message *** |
# | 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 | 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 |