title: Threadsafe static initialization of ExecutorService
body: <p>I am trying to create a threadsafe singleton class based on Initialization-on-demand holder idiom . Here is my code </p>
  
  <pre><code>public class Check{ 
    private Check(){  }
    private static class Provider {
      static final ExecutorService INSTANCE = new ThreadPoolExecutor(5, "read this val from file", 60L, TimeUnit.SECONDS, new LinkedBlockingQueue());
    }
    public static ExecutorService getInstance() {
      return Provider.INSTANCE;
    }
  }
  </code></pre>
  
  <p>My expectation is to initialize ExecutorService in a threadsafe manner and only one instance should be there (static).</p>
  
  <p>Is this code achieving that - or are any changes required?</p>