The Java volatile keyword is used to mark a Java variable as "being stored in main memory". More precisely that means, that every read of a volatile variable will be read from the computer's main ...
If you need to control access to certain pieces of data in a class when writing multithreaded applications, see how you can use the volatile keyword to get a similar effect as using the synchronized ...
原文:https://www.ibm.com/developerworks/java/library/j-jtp06197/index.html 参考翻译:https://www.ibm.com/developerworks/cn/java/j-jtp06197.html Volatile ...