title: Will a ScheduledExecutorService create new threads as needed?
body: <p>I'm using <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html#newScheduledThreadPool%28int%29"><code>Executors.newScheduledThreadPool()</code></a> to create a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html"><code>ScheduledExecutorService</code></a>, specifying the number of threads like so:</p>
  
  <pre><code>int corePoolSize = 42;
  ScheduledExecutorService foo = Executors.newScheduledThreadPool(corePoolSize);
  </code></pre>
  
  <p>According to the JavaDocs, the <code>corePoolSize</code> argument sets</p>
  
  <blockquote>
    <p>the number of threads to keep in the pool, even if they are idle.</p>
  </blockquote>
  
  <p>Does this mean that this <code>ExecutorService</code> implementation may create more than <code>corePoolSize</code> threads as needed, similar to a <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Executors.html#newCachedThreadPool%28%29">cached thread pool</a>?</p>