I wouldn't call it trivial if people have no
experience with POE. I for one didn't understand
from your example how you were suggesting it would
help him towards his goal of retrieving no more
then 10 at a time.
After reading the POE, POE::Session, & POE::Component::Client::UserAgent
I *think* what you're suggesting is that the poster
modifying 02multi.t so that this...
POE::Session -> create (
inline_states => {
_start => \&_start,
_stop => \&_stop,
response => \&response,
_signal => \&_signal
},
);
becomes this...
for (my $i = 0; $i < 10; $i++) {
POE::Session -> create (
inline_states => {
_start => \&_start,
_stop => \&_stop,
response => \&response,
_signal => \&_signal
},
);
}
and change _start to only loop over a 1/10
of @urls.
Does that sound about right?
Frankly, i'm still not clear on why this can't be done in
a more straight forward manner
with LWP::Parallel directly, It has the functionality
to limit the number of parrallel
requests to an individual server -- OR to limit the number
of different servers it sends requests to at the same time,
... why isn't there a more general way to limit the TOTAL number of parrallel requests?
|