Package org.cip4.jdflib.util
Class ThreadUtil
java.lang.Object
org.cip4.jdflib.util.ThreadUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDeprecated.use org.cip4.jdflib.util.thread.MyMutexstatic classDeprecated.use the local class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleansimple join wrapper that catches its exceptionstatic voidsimple notify that catches any and all exceptionsstatic voidsimple notify that catches any and all exceptionsstatic booleansleep(int millis) simple sleep wrapper that catches its exceptionstatic booleansimple wait wrapper that synchronizes catches its exception
-
Constructor Details
-
ThreadUtil
public ThreadUtil()
-
-
Method Details
-
sleep
public static boolean sleep(int millis) simple sleep wrapper that catches its exception- Parameters:
millis-- Returns:
- true if normal exit, false if interupted
-
join
simple join wrapper that catches its exception- Parameters:
thread- the thread to joinmillis-- Returns:
- true if normal exit, false if interupted
-
wait
simple wait wrapper that synchronizes catches its exception- Parameters:
mutex- the object that will wait, if null we assume we need not waitmillis- milliseconds to wait, 0 or lower: indefinite wait- Returns:
- true if normal exit, false if interupted or mutex is null
-
notifyAll
simple notify that catches any and all exceptions- Parameters:
mutex- the mutex to notify
-
notify
simple notify that catches any and all exceptions- Parameters:
mutex- the mutex to notify
-