I attended the EBIG Java SIG tonight, which featured a presentation by Bruce Eckel on threading in JDK 1.5. Though I’ve not done much multi-threaded programming myself, I’m very wary of it because I’ve seen enough damage at work by other developer’s failed attempts. Bruce confirmed my feelings; don’t make your program multi-threaded unless you absolutely have to.
The new threading features in the JDK 1.5 are based on previous work by Doug Lea, which now shows up in the java.util.concurrent package. The new capabilities look really powerful, but trying to follow Bruce’s example code and predicting the results before he ran the code had my head spinning. This is really tricky stuff.