subbu.org

Threads are Evil?

with 3 comments

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.

  • Digg
  • del.icio.us
  • Google

March 5th, 2008 at 12:25 pm

Tagged with ,

RSS feed | Trackback URI

3 Comments »

Comment by Gerald Nunn at 2008-03-05 12:37:37

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.

 
Comment by Subbu Allamaraju at 2008-03-05 12:41:29

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.

 
Comment by peter lawrey at 2008-03-06 23:08:11

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.

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Trackback responses to this post