Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: ithreads picks fight with LWP::Agent; everybody loses

by jepri (Parson)
on Feb 27, 2008 at 03:32 UTC ( [id://670468]=note: print w/replies, xml ) Need Help??


in reply to ithreads picks fight with LWP::Agent; everybody loses

I notice you're using a 64-bit install. How does it run on a 32-bit machine? Low level stuff like threads is notorius for going sproing on 64 bit machines.

___________________
Jeremy
Bots of the disorder.

Replies are listed 'Best First'.
Re^2: ithreads picks fight with LWP::Agent; everybody loses
by BlairHippo (Initiate) on Feb 27, 2008 at 07:27 UTC

    That I do not know; I haven't had the opportunity to run it on a 32-bit machine. I'll see if we have one handy, and thanks for the recommendation.

    I was unaware that 64-bit installs have that rep. This is obviously a hole in my knowledge that needs filling. Are there any resources in particular you'd recommend discussing what to avoid in Perl on a 64-bit machine? When the code goes "sproing!", so does my performance review.

      I don't have any experience in 64 bit perl beyond "it worked for me". But then, I wasn't doing something suicidal like using threads. My statement was more based on having watched windows and "Linux" flop around on the x86 64-bit beach as they attempted to drag themselves out of the 32-bit sea. So to speak. Linux and Perl have been 64-bit clean since before x86-64 existed, but there's no guarantees that other code on the system is clean and won't interfere in weird ways.

      Are there any resources in particular you'd recommend discussing what to avoid in Perl on a 64-bit machine?

      Don't use source filters. Also, don't use threads. Keep away from extensions written in C, since most C programmers still can't understand why they shouldn't store pointers in INTs.

      More generally, (system) threads are a bad solution for most problems. If you want to download a lot of files, for instance, you'll be better served using asynchronous calls than threads. For starters, your programs won't crash.

      Edit: use something like this instead: forks

      ___________________Jeremy_______Bots of the disorder.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://670468]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-03-28 08:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found