If the first thread hasn’t finished initializing SomeClass, the second thread will block.
This is detailed in the Java Language Specification in section 12.4.2.
More Related Contents:
- Volatile vs Static in Java
- Are static variables shared between threads?
- Are Java static initializers thread safe?
- Are non-synchronised static methods thread safe if they don’t modify static class variables?
- Static variables and multithreading in java
- How to properly stop the Thread in Java?
- Are static methods inherited in Java?
- Why is spawning threads in Java EE container discouraged?
- wait until all threads finish their work in java
- How come invoking a (static) method on a null reference doesn’t throw NullPointerException?
- When would you call java’s thread.run() instead of thread.start()?
- Updating UI from different threads in JavaFX
- How to demonstrate java multithreading visibility problems?
- Getting value of public static final field/property of a class in Java via reflection
- How does Java makes use of multiple cores?
- How to debug a multi-threaded app in IntelliJ?
- Prevent Swing GUI locking up during a background task
- When should I use a CompletionService over an ExecutorService?
- Calling static generic methods
- Multiple bouncing balls thread issue
- Is it OK to use Gson instance as a static field in a model bean (reuse)?
- Why do InterruptedExceptions clear a thread’s interrupted status?
- When does a Java Thread reach the ‘Die’ State
- How does the event dispatch thread work?
- Which concurrent Queue implementation should I use in Java?
- AsyncTask.executeOnExecutor() before API Level 11
- How does the JVM terminate daemon threads? or How to write daemon threads that terminate gracefully
- who and when notify the thread.wait() when thread.join() is called?
- Dynamic Thread Pool
- Concurrent read/write of named pipe in Java (on windows)