public class ThreadUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ThreadUtil.MyMutex
Deprecated.
use org.cip4.jdflib.util.thread.MyMutex
|
static class |
ThreadUtil.WaitTimeout<a>
abstract class to run uninteruptable stuff in an interruptable thread
|
Constructor and Description |
---|
ThreadUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
join(Thread thread,
int millis)
simple join wrapper that catches its exception
|
static void |
notify(Object mutex)
simple notify that catches any and all exceptions
|
static void |
notifyAll(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(Object mutex,
int millis)
simple wait wrapper that synchronizes catches its exception
|
public static boolean sleep(int millis)
millis
- public static boolean join(Thread thread, int millis)
thread
- the thread to joinmillis
- public static boolean wait(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(Object mutex)
mutex
- the mutex to notifypublic static void notify(Object mutex)
mutex
- the mutex to notifyCopyright © 2018. All rights reserved.