flâneur — a map of the web's best reading

Memory Consistency Errors (The Java™ Tutorials > Essential Java Classes > Concurrency)

docs.oracle.com · 603 words · saved by 1 readers

The Java Tutorials have been written for JDK 8. Examples and practices described in this page don't take advantage of improvements introduced in later releases and might use technology no longer available. See Java Language Changes for a summary of updated language features in Java SE 9 and subsequent releases. See JDK Release Notes for information about new features, enhancements, and removed or deprecated options for all JDK releases. Memory consistency errors occur when different threads have inconsistent views of what should be the same data. The causes of memory consistency errors are complex and beyond the scope of this tutorial. Fortunately, the programmer does not need a detailed understanding of these causes. All that is needed is a strategy for avoiding them. The key to avoiding memory consistency errors is understanding the happens-before relationship. This relationship is simply a guarantee that memory writes by one specific statement are visible to another specific stateme

Memory Consistency Errors (The Java™ Tutorials > Essential Java Classes > Concurrency) Documentation The Java™ Tutorials External Link --> Hide TOC Concurrency Processes and Threads Thread Objects Defining and Starting a Thread Pausing Execution with Sleep Interrupts Joins The SimpleThreads Example Synchronization Thread Interference Memory Consistency Errors Synchronized Methods Intrinsic Locks and Synchronization Atomic Access Liveness Deadlock Starvation and Livelock Guarded Blocks Immutable Objects A Synchronized Class Example A Strategy for Defining Immutable Objects High Leve

Explore this link on the map →

related reading