title: Thread safety of static blocks in Java
body: <p>Let's say I have some Java code:</p>
  
  <pre><code>public class SomeClass {
      static {
          private final double PI = 3.14;
          private final double SOME_CONSTANT = 5.76;
          private final double SOME_OTHER_CONSTANT = 756.33;
      }
  
    //rest of class
  }
  </code></pre>
  
  <p>If a thread is initializing SomeClass's <code>Class</code> object and is in the middle of initializing the values in the static block when a second thread wants to load SomeClass's <code>Class</code> again, what happens to the static block?  Does the second thread ignore it assuming it's already initialized even though the first thread is not done? Or does something else happen?</p>