|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
Eliminated nested locks of the same object:
synchronized (reader) { // we synchronize on reader
if (reader.getCount() > 0) { // calling synchronized method getCount() while already holding the lock
reader.incrementReserveCount(1);
}
|