Memory Consistency Errors (The Java™ Tutorials > Essential Java Classes > Concurrency)
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
- Synchronization (The Java™ Tutorials > Essential Java Classes > Concurrency)docs.oracle.com
- Thread Interference (The Java™ Tutorials > Essential Java Classes > Concurrency)docs.oracle.com
- Synchronized Methods (The Java™ Tutorials > Essential Java Classes > Concurrency)docs.oracle.com
- Atomic Access (The Java™ Tutorials > Essential Java Classes > Concurrency)docs.oracle.com
- Intrinsic Locks and Synchronization (The Java™ Tutorials > Essential Java Classes > Concurrency)docs.oracle.com
- research!rsc: Hardware Memory Models (Memory Models, Part 1)research.swtch.com
- LittleBookOfSemaphores.pdfgreenteapress.com
- C++11 Memory Modelpeople.cs.pitt.edu
- Memory Barriers Are Like Source Control Operationspreshing.com
- Reading 14: Concurrencyweb.mit.edu
- Notes on structured concurrency, or: Go statement considered harmful - njs blogvorpus.org
- Consistency model - Wikipediaen.wikipedia.org