title: Is Future.get() a replacement for Thread.join()?
body: <p>I want to write a command line daemon that runs forever. I understand that if I want the JVM to be able to shutdown gracefully in linux, one needs to wrap the bootstrap via some C code. I think I'll be ok with a shutdown hook for now.</p>
  
  <p>On to my questions:</p>
  
  <ol>
  <li>My main(String[]) block will fire off a separate Superdaemon.</li>
  <li>The Superdaemon will poll and loop forever.</li>
  </ol>
  
  <p>So normally I would do:</p>
  
  <pre><code>class Superdaemon extends Thread { ... }
  
  class Bootstrap
  {
      public static void main( String[] args )
      {
          Thread t = new Superdaemon();
          t.start();
  
          t.join();
      }
  }
  </code></pre>
  
  <p>Now I figured that if I started Superdaemon via an Executor, I can do</p>
  
  <pre><code>Future&lt;?&gt; f = exec.submit( new Superdaemon() );
  
  f.get();
  </code></pre>
  
  <p>Is <code>Future.get()</code> implemented with Thread.join() ?
  If not, does it behave equivalently ?</p>
  
  <p>Regards,</p>
  
  <p>ashitaka</p>