public class ThreadUtil
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ThreadUtil.MyMutex
Deprecated.
use org.cip4.jdflib.util.thread.MyMutex
|
static class |
ThreadUtil.WaitTimeout<a>
Deprecated.
use the local class
|
| Constructor and Description |
|---|
ThreadUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
join(java.lang.Thread thread,
int millis)
simple join wrapper that catches its exception
|
static void |
notify(java.lang.Object mutex)
simple notify that catches any and all exceptions
|
static void |
notifyAll(java.lang.Object mutex)
simple notify that catches any and all exceptions
|
static boolean |
sleep(int millis)
simple sleep wrapper that catches its exception
|
static boolean |
wait(java.lang.Object mutex,
int millis)
simple wait wrapper that synchronizes catches its exception
|
public static boolean sleep(int millis)
millis - public static boolean join(java.lang.Thread thread,
int millis)
thread - the thread to joinmillis - public static boolean wait(java.lang.Object mutex,
int millis)
mutex - the object that will wait, if null we assume we need not waitmillis - milliseconds to wait, 0 or lower: indefinite waitpublic static void notifyAll(java.lang.Object mutex)
mutex - the mutex to notifypublic static void notify(java.lang.Object mutex)
mutex - the mutex to notify