title: How does maximumPoolSize of ThreadPoolExecutor works?
body: <p>I'm trying to understand ThreadPoolExecutor class. I have read this <a href="https://stackoverflow.com/questions/10379314/how-does-keep-alive-work-with-threadpoolexecutor">answer</a> and the Javadoc. But my experimentation doesn't match with that description:</p>
  
  <p>I initialize the threadpool with an factory for tracking the ids</p>
  
  <pre><code>int tcounter = 0;
  ThreadPoolExecutor executor = new ThreadPoolExecutor(2, 4, 1, TimeUnit.MINUTES,
          new ArrayBlockingQueue&lt;Runnable&gt;(1000), new ThreadFactory() {
  
              @Override
              public Thread newThread(Runnable r) {
                  return new mThread(tcounter++, r);
              }
          });
  
  public class mThread extends Thread {
      int id;
  
      private mThread(int id, Runnable run) {
          super(run);
          GLog.e("created thread " + id);
          this.id = id;
      }
  
  }
  </code></pre>
  
  <p>then the task:</p>
  
  <pre><code>public class mRunanble implements Runnable {
      int value = 0;
  
      private mRunanble(int value) {
          super();
          this.value = value;
      }
  
      @Override
      public void run() {
          SystemClock.sleep(3000);
          Thread t = Thread.currentThread();
          if (t instanceof mThread) {
  
              GLog.e("Say " + (value) + " on thread " + ((mThread) t).id);
          } 
  
      }
  
  }
  </code></pre>
  
  <p>and assign a button the action:</p>
  
  <pre><code>executor.execute(new mRunanble(i++));
  </code></pre>
  
  <p>But I spam that button and the third thread is never created, so what is for the second paramether in the ThreadPoolExecutor constructor (<code>maximumPoolSize=4</code>).
  I was specting 4 threads to be created and 2 of them to be killed after 1 minute of the end of the execution</p>