Wednesday, February 6, 2008

Writing multithreaded Java applications

The Java Thread API allows programmers to write applications that can take advantage of multiple processors and perform background tasks while still retaining the interactive feel that users require. Alex Roetter introduces the Java Thread API, outlines issues involved in multithreading, and offers solutions to common problems.

When you are writing graphical programs that use AWT or Swing, multithreading is a necessity for all but the most trivial programs. Thread programming poses many difficulties, and many developers often find themselves falling prey to problems such as incorrect application behavior and deadlocked applications.

In this article, we'll explore the problems associated with multithreading and discuss solutions to the most common pitfalls.

0 comments: