title: JMM sequential consistency
body: <p>I'm trying to understand "sequential consistency" in terms of Java memory model. Definition from JLS, chapter 17 is not that clear to me.</p>
  
  <p>I will give my vision, correct me if I'm wrong. Having program with one thread sequential consistency means that if action1 comes before action2 in the program order, than action2 should see the results of action1.</p>
  
  <p>Having two threads.</p>
  
  <p>Thread1:</p>
  
  <pre><code>action1
  action2
  </code></pre>
  
  <p>Thread2:</p>
  
  <pre><code>action3
  action4
  </code></pre>
  
  <p>If <code>action3</code> sees the result of <code>action2</code>, than it should see the results of <code>action1</code> as well.</p>