RLock optimization