public class ThreadUtils extends Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
getResultInheritingPriority(Future<T> future,
int runningThreadId) |
static boolean |
isMainThread() |
static int |
tryInheritThreadPriorityFromCurrentThread(int threadId)
Try to raise the priority of to the priority of the calling thread
|
static int |
tryRaiseThreadPriority(int threadId,
int targetThreadPriority)
Try to raise the priority of to .
|
public static boolean isMainThread()
public static <T> T getResultInheritingPriority(Future<T> future, int runningThreadId)
public static int tryInheritThreadPriorityFromCurrentThread(int threadId)
public static int tryRaiseThreadPriority(int threadId, int targetThreadPriority)