I see this:
// thread is a member of this class
synchronized( this.thread )
{
  this.thread.running = false;
  this.thread.notifyAll(); // Wake up anything that was .waiting() on
  // the thread
  this.thread = null;  // kill this thread reference.
  // can you do that in a synchronized block?
}
Is it ok to set the thread=null while still keeping a lock on it?
I found this nugget in a bit of BB code.
 
     
     
     
     
    