Example of using volatile reading and writing.