org.jasen.util
Class ThreadUtils
java.lang.Object
org.jasen.util.ThreadUtils
- public final class ThreadUtils
- extends Object
General thread utils.
- Author:
- Jason Polites
Method Summary |
static boolean |
forceFinish(StoppableThread thread,
long timeout)
Requests a stop on the thread and forces an interrupt if the thread did not die within the given timeout. |
ThreadUtils
public ThreadUtils()
forceFinish
public static boolean forceFinish(StoppableThread thread,
long timeout)
- Requests a stop on the thread and forces an interrupt if the thread did not die within the given timeout.
- Parameters:
thread
- The thread to stoptimeout
- The time in milliseconds to wait for the thread to die
- Returns:
- True if the thread died cleanly, or false if it needed to be interrupted