boolean () { for (Reader participant : participants) { if (participant.state == Reader.State.WRITE) { LockSupport.unpark(participant.thread); // parked by writeLock() // Don't try to wakeup readers return true; } if (participant.state == Reader.State.WRITE_INTENT) { LockSupport.unpark(participant.thread); // parked writeIntentLock() // Could wake up readers too return false; } } return false; }