Juha Laiho <Juha.Laiho@iki.fi> spewed forth with:
> Where threads fit are situations where you're doing multiple tasks
> simultaneously (in parallel), and the tasks have much data to interchange
> with each other. You could do this with several processes and various
> forms of IPC, too, but communication between processes is expensive
> in terms of CPU use. So, threads lower the CPU utilization by reducing
> the need for IPC, and can also reduce communications latency when
> compared to multiple processes exchanging data.
As a relatively poor example of this, I'm writing a threaded YACMP (Yet
Another Car Mp3 Player) application. Different threads handle reading from
the app actually doing the decoding (currently rxaudio, but may change to
mpg123), the buttons for input, etc. I suppose it could be done with forking
instead, but it works for me. Whether you're forking or threading, an advantage
is that if one part blocks (like waiting for user input), the rest keeps
running.

Paul Archer