Threads are Evil?
I just across this comment by Douglas Crockford on threads.
So in my view, I think Java got it wrong. Java proposed a single language for both the system level and the application level. That unified model made threads available at the application level. And that is evil.
No. Java did not get it wrong. In the Java (or even other managed languages) world, the system level software are the containers. Containers use threads to manage the applications deployed on them. Applications are managed, and rarely use threads.



Absolutely right, however I wonder if part of it is that sometimes there is a tendency with J2EE developers to forget that Java is a general purpose language and not just a server side tool. While in J2EE containers manage the thread model and application code is rarely involved, threads are absolutely essential in other contexts. For example, threads are a key component in GUI applications to ensure to ensure that the GUI remains responsive to user interaction.
You are absolutely right. There is a tendency in some language camps to treat threads as evil, and unfortunately, it does not cut it always.
I have found that sensible use of thread pools built in Java 5 makes threads largely a non-issue. Some disciple or strategy is required.
I have written a framework with multiple thread pools with multiple threads, the team size has been about 15 for over a year and we haven’t had multi-threading issues.