Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Thread::Queue and WWW::Curl

by Corion (Pope)
on Sep 24, 2012 at 14:33 UTC ( #995399=note: print w/replies, xml ) Need Help??

in reply to Thread::Queue and WWW::Curl

You don't show where you create instances of WWW::Curl(::Easy). I recommend that you do so separately and only within each thread, because most likely the WWW::Curl objects are backed by corresponding C objects, and those may or may not like dancing between different threads and maybe are not even threadsafe unless precautions are taken.

Personally, I would look at ditching threads and looking at the Curl-native routines in WWW::Curl::Multi. These should be able to run within a single worker thread and at least for the fetching part, you are most likely limited by network bandwidth/latency anyway.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://995399]
[shmem]: erix: bad idea. PerlMonks is based on everything
[robby_dobby]: shmem:everything2
robby_dobby says Sorry and points to his boredom
[shmem]: robby_dobby: since everything is everything, it is thus also everything2. And everything2 is based on... you name it.
[Corion]: Mhhmmm. I just had to remind two contractos of their priorities from my point of view. This felt somewhat like getting my godson+siblings to clean their room, including the evil eye I threw them ;)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2017-04-25 13:29 GMT
Find Nodes?
    Voting Booth?
    I'm a fool:

    Results (454 votes). Check out past polls.