Lock reads and writes to currentValue.