Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Is LWP thread-safe?

Reply
Thread Tools

Is LWP thread-safe?

 
 
Agent2002
Guest
Posts: n/a
 
      02-10-2005
Hi,
I enjoyed LWP so much that it can help me automating nearly all the
tasks a web browser can do. I also found that combining LWP with Perl's
new multi-thread model "ithread" can improve the efficiency of my web
scripts significantly, about ten or more times faster, perhaps.
For example, I've written a Perl script that can download the latest
news from CNN.com very quickly since it uses ten threads every instant
and it works very fine and has never got any problem. However, the
script I wrote recently using LWP and ithread together crashes every
time when it has accessed a URL using sufficient proxies. And I always
get the following error message:
Free to wrong pool 15306e48 not 272770.
I really have no idea whether it is caused by the LWP module. Could any
one tell me doubtlessly the LWP module is thread-safe or not? Thank you
very much.

 
Reply With Quote
 
 
 
 
John Bokma
Guest
Posts: n/a
 
      02-10-2005
Agent2002 wrote:

> Hi,
> I enjoyed LWP so much that it can help me automating nearly all the
> tasks a web browser can do. I also found that combining LWP with Perl's
> new multi-thread model "ithread" can improve the efficiency of my web
> scripts significantly, about ten or more times faster, perhaps.
> For example, I've written a Perl script that can download the latest
> news from CNN.com very quickly since it uses ten threads every instant
> and it works very fine and has never got any problem. However, the
> script I wrote recently using LWP and ithread together crashes every
> time when it has accessed a URL using sufficient proxies. And I always
> get the following error message:
> Free to wrong pool 15306e48 not 272770.
> I really have no idea whether it is caused by the LWP module. Could any
> one tell me doubtlessly the LWP module is thread-safe or not? Thank you
> very much.


Have you looked at the parallel useragent module? It doesn't use threads
(AFAIK), but does work in parallel (maybe less efficient)

--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LWP with proxy problem Woogie Perl 1 12-22-2003 07:51 PM
LWP::UserAgent to POST and redirect browser at the same time La Jesus Perl 9 10-27-2003 09:55 PM
LWP::Authen::Ntlm Error when often used Reto Zingg Perl 0 09-28-2003 09:56 PM
Perl LWP and Siteminder Basic Authentication Tommy Perl 0 09-22-2003 10:53 PM
Re: LWP::Simple header information problems cp Perl 3 06-25-2003 06:35 PM



Advertisments