ch.bind.philib.lang
Class ThreadUtil
java.lang.Object
ch.bind.philib.lang.ThreadUtil
public abstract class ThreadUtil
- extends Object
- Author:
- Philipp Meinen
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadUtil
protected ThreadUtil()
sleepUntilMs
public static void sleepUntilMs(long time)
throws InterruptedException
- Throws:
InterruptedException
interruptAndJoin
public static boolean interruptAndJoin(Thread t)
- Parameters:
t - the thread which must be interrupted and joined with a default timeout
- Returns:
true for OK, false in case of an error.
interruptAndJoin
public static boolean interruptAndJoin(Thread t,
long waitTime)
- Parameters:
t - the thread which must be interruptedwaitTime - a specific timeout for the join operation. A negative or zero value means to no timeout is
implied.
- Returns:
true for OK, false in case of an error.
Copyright © 2013. All Rights Reserved.