note
merlyn
No, son. Maybe I've been around a bit longer than you, but we were accomplishing everything that people are trying to do with threads with simple forks some 20 years ago. And the coding was much simpler, easier to debug, easier to maintain, easier to prove correct.
<p>
If the answer is "threads", you asked the wrong question. Threads suck. Event-driven programs and processes are a much cleaner model, with a far better defect ratio.
<p>
And a forked program cluster will use your two, four, and 20-way core boxes just fine. No need to introduce the bizarre complexity of threads.
<p>
Using threads are like using globals... sure you can do it, but it requires a lot more care. Using fork is like having everything be local to its code and data, which is what you want in a large system anyway.
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-9073">
<p>-- [http://www.stonehenge.com/merlyn/|Randal L. Schwartz, Perl hacker]
<br>
Be sure to read [id://205373|my standard disclaimer] if this is a reply.</p>
</div></div>
580004
580012