rcm.util
Class Thr

java.lang.Object
  |
  +--rcm.util.Thr

public abstract class Thr
extends java.lang.Object


Constructor Summary
Thr()
           
 
Method Summary
static void check()
          Test whether the current thread has been interrupted with Thread.interrupt().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Thr

public Thr()
Method Detail

check

public static void check()
                  throws java.lang.ThreadDeath
Test whether the current thread has been interrupted with Thread.interrupt(). If so, a ThreadDeath exception is thrown to kill it cleanly. If a background thread calls check() periodically, then Thread.interrupt() will kill it cleanly and safely at the next check() call. Catch ThreadDeath or use a try-finally construct if your background thread needs to do any resource cleanup.

Throws:
java.lang.ThreadDeath - if and only if Thread.currentThread().isInterrupted() is true.