Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: threads: spawn early to avoid the crush.

by zentara (Archbishop)
on Mar 02, 2006 at 16:24 UTC ( [id://533956]=note: print w/replies, xml ) Need Help??


in reply to Re: threads: spawn early to avoid the crush.
in thread threads: spawn early to avoid the crush.

there is basically nothing that threading has to offer (well, headaches and longer development times,

I see just the opposite. When you have a situation where you need to share data between separate processes, it is easier for me to use threads and threads::shared. I suppose if you are used to setting up safe shared memory segments for IPC, then it may be easier for you. But I still see in that situation, threads and shared data is easier to setup, and safer. I shudder when I see those shared memory segments which are not cleaned up.....I've seen some shared mem segment apps,which are supposed to clean up after themselves, leave shared memory segments intact, after a kill 9 or a control-c. I will take threads anyday. Additionally, shared mem segments work differently on win32 and unix/linux, so you need to code twice. Whereas threads work the same on win32 and unix/linux, as far as perl code is concerned.

And there is the option of dealing with a gazillion pipes....yuck.

But I agree with you that if you don't need to share data, forking is preferred over threads.


I'm not really a human, but I play one on earth. flash japh
  • Comment on Re^2: threads: spawn early to avoid the crush.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-19 04:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found