There are some monks that seem to believe that thread support is somehow important for perl, I could never see a need for it, especially when the arguments goes "Threads are faster then processes", which is true only on Win32. And supposedly it's true because of braindead implementation of process that Win32 uses.
The point is mostly moot, because perl has a very weak support for threaded programs, and there were multiple problems with perl's implementation in the past ( thus one might like to avoid using those features until the stage stabilises ), additionally few distrbutions wisely avoided shipping threaded perl recently, few tried being on the edge, and ended up shipping edgy software...
However, does perl really need threads? Would you use them if they were available in stable form? Is current implementation solid enough?
I think few recent developments like hyperthreading, SMT and SUN's Niagara, which puts ~8 threads on single CPU, make threading support somewhat necessary, other then that, traditionall process model seems more efficient, and definitelly easier to debug.
update
Most replies assume that the only way to use multiple CPUs is by using threads. AFAIK threads make sense only in 2~4 CPUs range, when you add more processors you start running into trouble, what about keeping cache in sync on dozens of CPUS? Since everything is shared, you need to keep everything in sync, which is very costly.
The solution (to the "let's use threads exclusively" problem ) is to build a CPU that uses multiple threads with single shared cache.
IBM's SMT and P4's HT does that, and Niagara does that in a very radical way. You don't want threaded programs on your multi-CPU machine (like 8-core AMD64?).
If you like multi-CPU machines, then you would want to write your programs with as little sharing as possible, you would explicitely marked the areas you want shared, and try to keep this area as small as possible, and that's the state-of-the-art as far as I know.
Has the state of the art changed?
In reply to Threading vs perl by Eyck
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |