protected void stopTestThread() {
      this.stopped = true;
    }
A thread that can be added to a test context, and properly passes exceptions through.
hbase-server/src/test/java/org/apache/hadoop/hbase/MultithreadedTestUtil.java