| java.lang.Object org.zkoss.lang.Threads
Threads | public class Threads (Code) | | Thread relevant utilities.
author: tomyeh |
Method Summary | |
final public static void | dummy(Object o) A dummy function that is used to avoid compiler from optimizing
statments around it. | final public static void | joinAndInterrupt(Thread thd, int timeout) | final public static void | pause(int millisecs) Put the current thread to sleep for a while. | final public static void | setDaemon(Thread thd, boolean daemon) Sets the priority without throwing any exception but log warning. | final public static void | setPriority(Thread thd, int priority) Sets the priority without throwing any exception but log warning. | final public static void | sleep(int millisecs) Put the current thread to sleep for a while. |
dummy | final public static void dummy(Object o)(Code) | | A dummy function that is used to avoid compiler from optimizing
statments around it.
|
joinAndInterrupt | final public static void joinAndInterrupt(Thread thd, int timeout) throws InterruptedException(Code) | | Waits a thread to die (and interrupt once a while)
Parameters: timeout - how long to wait (0 means forever) |
pause | final public static void pause(int millisecs)(Code) | | Put the current thread to sleep for a while.
Threads.sleep |
setDaemon | final public static void setDaemon(Thread thd, boolean daemon)(Code) | | Sets the priority without throwing any exception but log warning.
|
setPriority | final public static void setPriority(Thread thd, int priority)(Code) | | Sets the priority without throwing any exception but log warning.
|
sleep | final public static void sleep(int millisecs)(Code) | | Put the current thread to sleep for a while.
exception: SystemException - if it is interrupted. since: 3.0.0 |
|
|