737 |
|
advanceHead(h, hn); |
738 |
|
continue; |
739 |
|
} |
740 |
< |
QNode t = tail; // Ensure consistent read for tail |
740 |
> |
QNode t = tail; // Ensure consistent read for tail |
741 |
|
if (t == h) |
742 |
|
return; |
743 |
< |
QNode tn = t.next; |
744 |
< |
if (t != tail) |
743 |
> |
QNode tn = t.next; |
744 |
> |
if (t != tail) |
745 |
|
continue; |
746 |
|
if (tn != null) { |
747 |
|
advanceTail(t, tn); |
808 |
|
public void put(E o) throws InterruptedException { |
809 |
|
if (o == null) throw new NullPointerException(); |
810 |
|
if (transferer.transfer(o, false, 0) == null) { |
811 |
< |
Thread.interrupted(); |
811 |
> |
Thread.interrupted(); |
812 |
|
throw new InterruptedException(); |
813 |
< |
} |
813 |
> |
} |
814 |
|
} |
815 |
|
|
816 |
|
/** |
857 |
|
Object e = transferer.transfer(null, false, 0); |
858 |
|
if (e != null) |
859 |
|
return (E)e; |
860 |
< |
Thread.interrupted(); |
860 |
> |
Thread.interrupted(); |
861 |
|
throw new InterruptedException(); |
862 |
|
} |
863 |
|
|