I'm following this tutorial: https://www.vogella.com/tutorials/JavaConcurrency/article.html . In one place it says:
As of Java 5, write access to a volatile variable will also update non-volatile variables which were modified by the same thread.
This is confusing to me. Does it mean that other thread variables held in CPU cache will also be updated in main memory on write access to volatile
?
(If I understand correctly, updating the variable in main memory on write access is what volatile
keyword ensures)
Something else? What can be meant precisely here?