Guard against race with ReadWriteLock