What does volatile actually do?

Your accepted answer is incorrect and misleading and you should delete it. Please refer to the official volatile documentation.

4 Likes