bobr has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to create simple parallel http getter with AnyEvent::HTTP. My program is bit larger, but following test case demostrates my issue well:
use AnyEvent::HTTP; my $cv = AnyEvent->condvar; my @urls = map { chomp; $_ } <DATA>; for my $url (@urls) { $cv->begin; http_get $url, sub { my ($body, $hdr) = @_; warn "[$hdr->{Status}:$hdr->{Reason}] ",$url," (",length($body +),")\n"; $cv->end; }; } $cv->recv; __DATA__ some urls
This works quite well, except that about 60% of queries end with result 599 - Unknown error. The list of failed ones does not seem to be consistent, it changes with every run. Any clue?
Running ActivePerl 5.10 on WinXP
-- thanks, Roman
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with AnyEvent::HTTP
by OverlordQ (Hermit) on Aug 20, 2010 at 16:13 UTC | |
by bobr (Monk) on Aug 20, 2010 at 18:24 UTC | |
|
Re: Problem with AnyEvent::HTTP
by zentara (Cardinal) on Aug 20, 2010 at 15:00 UTC | |
by james2vegas (Chaplain) on Aug 21, 2010 at 10:31 UTC | |
by bobr (Monk) on Aug 20, 2010 at 15:22 UTC |