Lock is a mechanism for reads or writes safely if there are many threads currently using the same values.