Details
Description
In current implementation, synchronized, wait and notifyAll make the code difficult to understand. I'll use ReetrantLock and Condition to make them clear.
In current implementation, synchronized, wait and notifyAll make the code difficult to understand. I'll use ReetrantLock and Condition to make them clear.
In this patch, I use ReentrantReadWriteLock and Condition to refactor the implementation.