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.
Looks at how and why you might want to roll your own exclusion semaphores, and presents a lock manager that will help you safely acquire multiple semaphores.
Focuses on thread groups, volatility, thread-local variables, timers, and the ThreadDeath class. Also describes how various thread concepts combine to finalize objects.
In this article, Brian Goetz looks at some of the commonly proposed fixes and shows how each of them fails to render the DCL idiom thread-safe under the Java Memory Model.
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 met...
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.