Overview and Implementation of an Upgradable ReentrantReadWriteLock in Java
This article explains the principles of Java's ReentrantReadWriteLock, details lock downgrade and upgrade mechanisms, provides a full source analysis of read and write lock implementations, and presents a custom upgradable lock with test code and performance observations.