title: How to start/stop/restart a thread in Java?
body: <p>I am having a real hard time finding a way to start, stop, and restart a thread in Java.</p>
  
  <p>Specifically, I have a class <code>Task</code> (currently implements <code>Runnable</code>) in a file <code>Task.java</code>. My main application needs to be able to START this task on a thread, STOP (kill) the thread when it needs to, and sometimes KILL &amp; RESTART the thread...</p>
  
  <p>My first attempt was with <code>ExecutorService</code> but I can't seem to find a way for it restart a task. When I use <code>.shutdownnow()</code> any future call to <code>.execute()</code> fails because the <code>ExecutorService</code> is "shutdown"...</p>
  
  <p>So, how could I accomplish this?</p>