title: Naming threads and thread-pools of ExecutorService
body: <p>Let's say I have an application that utilizes the <code>Executor</code> framework as such</p>
  
  <pre><code>Executors.newSingleThreadExecutor().submit(new Runnable(){
      @Override
      public void run(){
          // do stuff
      }
  }
  </code></pre>
  
  <p>When I run this application in the debugger, a thread is created with the following (default) name: <code>Thread[pool-1-thread-1]</code>. As you can see, this isn't terribly useful and as far as I can tell, the <code>Executor</code> framework does not provide an easy way to name the created threads or thread-pools.</p>
  
  <p>So, how does one go about providing names for the threads/thread-pools? For instance, <code>Thread[FooPool-FooThread]</code>.</p>