lapisx.util
Class Thr
java.lang.Object
lapisx.util.Thr
- public abstract class Thr
- extends 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 |
Thr
public Thr()
check
public static void check()
throws 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:
ThreadDeath
- if and only if
Thread.currentThread().isInterrupted() is true.