Double-Checked Locking: Clever, but Broken
Though many Java books and articles recommend double-checked locking, unfortunately, it is not guaranteed to work in Java.
Warning! Threading in a Multiprocessor World
Many authors advocate the double-checked locking idiom to access a Singleton object in an intuitively thread-safe way. Unfortunately, for counterintuitive reasons, double-checked locking doesn't work in Java.
Programming Java Threads in the Real World, Part 9
Discussion of two more architectural solutions to threading problems: a synchronous dispatcher (or 'reactor') and an asynchronous dispatcher (or 'active object').
Programming Java Threads in the Real World, Part 8
Discusses architectural solutions to threading problems. Takes a look at threads from the perspective of an object-oriented designer, and at how to implement threads in an object-oriented environment, focusing on the implementation of asynchronous methods.
Programming Java Threads in the Real World, Part 7
Reader/writer locks let multiple threads safely access a shared resource in an efficient way.
Programming Java Threads in the Real World, Part 6
How to implement the Observer pattern (used by AWT/Swing for its event model) in a multithreaded environment.
Programming Java Threads in the Real World, Part 5
Timers let you perform fixed-interval operations, such as animation refreshes.
Programming Java Threads in the Real world, Part 4
A condition variable adds to wait the ability to not wait when the condition you're waiting for has already taken place; and a counting semaphore lets you control a pool of resources without sucking up machine cycles in polling loops.
Threads 101
Explains from the ground up how to get threads work correctly. (Chuck Allison)
Simple Java Thread Management Library (SJT.Mgmt)
An easy to use library for adding thread management in Java applications. The library comes from early experience with JServ's lack of thread management, and recent posts to the java developer forums. [Open source]
|