摘要:
/** * Removes and transfers one or all waiters to sync queue. */ private void doSignal(ConditionNode first, boolean all) { while (first != null) { Con 阅读全文
摘要:
public final void await() throws InterruptedException { if (Thread.interrupted()) throw new InterruptedException(); ConditionNode node = new Condition 阅读全文
摘要:
public final boolean tryAcquireNanos(int arg, long nanosTimeout) throws InterruptedException { // 如果线程已经被中断则抛中断异常 if (!Thread.interrupted()) { // 首次简单 阅读全文
摘要:
此处的acquire方法指AQS内部的私有acquire方法,方法签名为 final int acquire(Node node, int arg, boolean shared, boolean interruptible, boolean timed, long time) static fin 阅读全文
摘要:
/** * Possibly repeatedly traverses from tail, unsplicing cancelled * nodes until none are found. Unparks nodes that may have been * relinked to be ne 阅读全文
摘要:
static final int WAITING = 1; // must be 1 static final int CANCELLED = 0x80000000; // must be negative static final int COND = 2; // in a condition w 阅读全文