摘要:
lock锁中有一段代码: protected final boolean tryAcquire(int acquires) { final Thread current = Thread.currentThread(); int c = getState(); if (c == 0) { if (! 阅读全文
摘要:
限时等待 线程状态最后的一个状态:TIMED_WAITING(限时等待)。 1、定义 一个正在限时等待另一个线程执行一个动作的线程处于这一状态。 A thread that is waiting for another thread to perform an action for up to a 阅读全文
摘要:
wait 在这一篇章里,我们来看另一个重要的状态:WAITING(等待)。 1、定义 一个正在无限期等待另一个线程执行一个特别的动作的线程处于这一状态。 A thread that is waiting indefinitely for another thread to perform a par 阅读全文