Happens-before-order
A partial ordering between instructions and events that specifies when one operation is guaranteed to be visible to another.
Happens-before is the heart of modern memory models such as Java Memory Model and C++11. It defines which operations must be observable before others begin. Without this ordering, a compiler or CPU could reorder instructions in ways that make reasoning about concurrent programs impossible. With happens-before, programmers can write and prove properties of concurrent code.
The relation is transitive—if A happens-before B and B happens-before C, then A happens-before C. It enables both theoretical analysis and practical verification of data races.