介绍
java.util.concurrent.locks.LockSupport
public class LockSupport
API
static
- setCurrentBlocker
void setCurrentBlocker(Object blocker)
- 设置当前线程的阻塞对象
- getBlocker
Object getBlocker(Thread t)
- 返回提供给最近一次调用尚未解除阻塞的 park 方法的阻塞对象,如果未被阻塞则返回 null
- unpark
void unpark(Thread thread)
- park
void park()
void park(Object blocker)
- parkNanos
void parkNanos(long nanos)
void parkNanos(Object blocker, long nanos)
- parkUntil
void parkUntil(long deadline)
void parkUntil(Object blocker, long deadline)