Is LWP thread-safe?

Discussion in 'Perl Misc' started by Agent2002, Feb 10, 2005.

  1. Agent2002

    Agent2002 Guest

    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.
     
    Agent2002, Feb 10, 2005
    #1
    1. Advertising

  2. Agent2002

    John Bokma Guest

    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
     
    John Bokma, Feb 10, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gabriel Rossetti
    Replies:
    0
    Views:
    1,398
    Gabriel Rossetti
    Aug 29, 2008
  2. Replies:
    1
    Views:
    375
    Brian Candler
    Aug 12, 2003
  3. Aredridel

    Not just $SAFE, but damn $SAFE

    Aredridel, Sep 2, 2004, in forum: Ruby
    Replies:
    19
    Views:
    266
  4. Farrel Lifson

    $SAFE =4 safe enough?

    Farrel Lifson, Aug 29, 2006, in forum: Ruby
    Replies:
    7
    Views:
    120
    Eric Hodel
    Aug 31, 2006
  5. John Nagle
    Replies:
    5
    Views:
    512
    John Nagle
    Mar 12, 2012
Loading...

Share This Page