Use atomic read and write.