public final class ThreadUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
sleep(long timeout)
Pause the current thread and return false in case it has been interrupted.
|
static boolean |
wait(Object lock,
long timeout)
Call the wait method on the given lock and return false in case it has been interrupted
MUST be called in a synchronized block and in a loop to check condition.
|
public static boolean wait(Object lock, long timeout)
public static boolean sleep(long timeout)
Copyright © 2019. All rights reserved.