The problem with threads is that they are evil and they are evil for three reasons as follows:
- They are algorithmic.
- They are asynchronous.
- They require context switching.
Basing software construction on the algorithm is evil because it ignores the true nature of computing. It is the primary reason for the software reliability and productivity crisis. Asynchronous processing is evil because it leads to non-deterministic timing, which, in turn, leads to unreliable software. Context switching is evil because it introduces a lot of processing overhead. This becomes unmanageable in a system that uses fine-grained parallelism to handle a huge number of simple parallel objects. There is a simple way to perform synchronous parallel processing that does not require the use of threads. CPU designers should abandon the algorithmic/thread model and adopt the COSA Software Model. COSA is a non-algorithmic, signal-based, synchronous software model. It is simpler and it solves all the nasty problems that are currently plaguing the computer industry.
PS. I'm kidding about the 'evil' part but threads are bad, any way you look at them.