The use of volatility makes sense only in multiprocessor systems. it is not right?
I'm trying to learn about thread programming, so if you know any good articles / pdfs ... I like stuff that is a bit reminiscent of how the operating system works, not just the language syntax.
volatile is used to ensure that the entire stream sees the same copy of the data. If a field has only one read / write stream, it does not have to be volatile. It will work just fine, just be a little slower.
Java , , .
Java Concurrency , , , http://www.javaconcurrencyinpractice.com/
Java - , .. , , , , .;)
. Volatile . .
Volatile , , . volatile JVM ( Java), . , Threads, volatile, .
. Java . Volatile.
. Volatile concurrency. .
This article from Brian Goetz’s article really helped me understand volatile. He has several examples of use volatile, and he explains under what conditions it can be used.
volatile
Source: https://habr.com/ru/post/1783681/More articles:jQuery: replace () class name / regex - jqueryHibernate not loading related object - javaIMultiValueConverter values are fine, but CommandParameter is NULL - wpfNinject - How to dynamically select an implementation for binding to an interface - ninjectReplacing wildcard text with jquery - jqueryWindows virtual printer, where to start? - windowsWhat are the benefits of interfaces and abstract classes? - oopChange the color of a JCheckBox / JRadioButton selection - javaCan I use Git for version control and is still SOX compatible? - gitto get property value inside html helper - asp.net-mvcAll Articles