public class ThreadUtil
extends java.lang.Object
Constructor and Description |
---|
ThreadUtil() |
Modifier and Type | Method and Description |
---|---|
static java.util.concurrent.ThreadFactory |
daemonThreadFactory(java.lang.String name)
Creates new daemon thread factory.
|
static java.util.concurrent.ThreadFactory |
daemonThreadFactory(java.lang.String name,
int priority)
Creates new daemon thread factory.
|
static void |
join(java.lang.Thread thread) |
static void |
join(java.lang.Thread thread,
long millis) |
static void |
join(java.lang.Thread thread,
long millis,
int nanos) |
static void |
notify(java.lang.Object obj)
Notifies an object for synchronization purposes.
|
static void |
notifyAll(java.lang.Object obj)
Notifies an object for synchronization purposes.
|
static void |
sleep()
Puts a thread to sleep forever.
|
static void |
sleep(long ms)
Puts a thread to sleep, without throwing an InterruptedException.
|
static void |
wait(java.lang.Object obj)
Waits for a object for synchronization purposes.
|
static void |
wait(java.lang.Object obj,
long timeout)
Waits for a object or a timeout for synchronization purposes.
|
public static void sleep(long ms)
ms
- the length of time to sleep in millisecondspublic static void sleep()
public static void wait(java.lang.Object obj)
public static void wait(java.lang.Object obj, long timeout)
public static void notify(java.lang.Object obj)
public static void notifyAll(java.lang.Object obj)
public static void join(java.lang.Thread thread)
public static void join(java.lang.Thread thread, long millis)
public static void join(java.lang.Thread thread, long millis, int nanos)
public static java.util.concurrent.ThreadFactory daemonThreadFactory(java.lang.String name)
public static java.util.concurrent.ThreadFactory daemonThreadFactory(java.lang.String name, int priority)
Copyright © 2003-present Jodd Team