Brian Goetz > Quotes > Quote > Miloš liked it
“When a field is declared volatile, the compiler and runtime are put on notice that this variable is shared and that operations on it should not be reordered with other memory operations. Volatile variables are not cached in registers or in caches where they are hidden from other processors, so a read of a volatile variable always returns the most recent write by any thread.”
― Java Concurrency in Practice
― Java Concurrency in Practice
No comments have been added yet.
