logo       

RE: Is enq(Node node) safe?: msg#00015

java.jsr.166-concurrency

Subject: RE: Is enq(Node node) safe?

> Hu Jinsong wrote:
>
> Sorry, I do not notice that.
> Then how about compareAndSetTail part of this enq method, then my test
> scenario does apply, doesn't it?
>

No that is the part that Doug referred to where users of the code compensate
for the fact that the next field is set potentially much later from when the
tail is swapped in - so a null next field does not imply it is the tail. See
the docs on the Node.next field.

David Holmes


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise