A lot has been said in this thread already. And in
Things you need to know before programming Perl ithreads I describe the current status of threads in Perl as I see it.
I agree with chromatic's comments. Perl threads currently provide an interface to doing threads in Perl over doing non-portable stuff in shared memory. It makes it easy and portable. It's not really production ready, especially for a mod_perl environment.
I also agree with most of Abigail-II's comments. Fork() is very cheap on modern *nix systems.
Which is why my forks.pm module gives you a bit of the best of both worlds: the memory savings of fork() and the ability to use a standard Perl executable (even with 5.6.x!) and the portable interface of threads.pm and its shared variables. At the expense of CPU and latency: there is always a price to pay!
Liz
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
|
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.