title: Stop and re-run a thread inside itself
body: <p>I have a thread implemented inside a class using runnable like this: </p>
  
  <pre><code>static Runnable myThread = new Runnable() {
   public void run(){
    try{
    //do something forever 
    }catch(Exception e){
      //something happened. Re-run this thread
    }
   } 
  }
  </code></pre>
  
  <p>I want to keep running this thread even when an exception is found. So, how can i do that inside the exception clause? Is there a more elegant solution to this?</p>