reverted to use ReentrantReadWriteLock