Revision: | 1.9 |
Committed: | Mon Nov 24 07:55:28 2008 UTC (15 years, 7 months ago) by root |
Branch: | MAIN |
CVS Tags: | rel-5_151, rel-5_1, rel-6_0, rel-6_5, rel-6_10, rel-6_13, rel-6_09, rel-6_08, rel-6_07, rel-6_06, rel-6_05, rel-6_04, rel-6_03, rel-6_02, rel-6_01, rel-5_161, rel-5_371, rel-5_372, rel-6_512, rel-6_513, rel-6_511, rel-6_514, rel-5_22, rel-5_23, rel-5_24, rel-5_25, rel-6_32, rel-6_33, rel-6_31, rel-6_36, rel-6_37, rel-5_162, rel-5_2, rel-6_38, rel-6_39, rel-5_37, rel-5_36, rel-6_23, rel-6_29, rel-6_28, rel-6_46, rel-6_45, rel-6_51, rel-6_52, rel-6_53, rel-6_54, rel-6_55, rel-6_56, rel-6_57, rel-5_11, rel-5_12, rel-5_15, rel-5_14, rel-5_17, rel-5_16, rel-6_43, rel-6_42, rel-6_41, rel-6_47, rel-5_132, rel-5_131, rel-6_44, rel-6_49, rel-6_48, HEAD |
Changes since 1.8: | +2 -1 lines |
Log Message: | 5.1 |
# | User | Rev | Content |
---|---|---|---|
1 | root | 1.1 | #!/usr/bin/perl |
2 | |||
3 | root | 1.9 | use Coro::LWP; # should be use'd as early as possible |
4 | |||
5 | root | 1.1 | use Coro; |
6 | root | 1.8 | use Coro::AnyEvent; |
7 | root | 1.1 | use LWP::Simple; |
8 | |||
9 | root | 1.3 | $SIG{PIPE} = 'IGNORE'; |
10 | |||
11 | root | 1.6 | my @pids; |
12 | |||
13 | root | 1.7 | for (1..1) { |
14 | push @pid, async { | ||
15 | print "starting to fetch http://www.google.de/\n"; | ||
16 | get "http://www.google.de/"; | ||
17 | print "fetched http://www.google.de/\n"; | ||
18 | }; | ||
19 | root | 1.4 | |
20 | root | 1.7 | push @pid, async { |
21 | print "starting to fetch http://www.yahoo.com/\n"; | ||
22 | get "http://www.yahoo.com/"; | ||
23 | print "fetched http://www.yahoo.com/\n"; | ||
24 | }; | ||
25 | } | ||
26 | root | 1.1 | |
27 | root | 1.6 | $_->join for @pid; |
28 | root | 1.1 |