...

/

Volatile

Volatile

This section discusses the volatile keyword.

Volatile

Informally, the volatile keyword forbids any reordering and caching optimizations to be applied on a field marked volatile. More formally, when a volatile field is read an acquire-fence is generated and when it is written to a release-fence is generated.

Let's see an example to clarify these concepts. Consider the ...

Access this course and 1400+ top-rated courses and projects.