in reply to Why use threads over processes, or why use processes over threads?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Why use threads over processes, or why use processes over threads?
by perrin (Chancellor) on Nov 11, 2003 at 16:09 UTC | |
by liz (Monsignor) on Nov 11, 2003 at 18:17 UTC | |
by liz (Monsignor) on Nov 11, 2003 at 21:22 UTC |