31 |
|
|
32 |
|
/* |
33 |
|
* This is a straight adaptation of Michael & Scott algorithm. |
34 |
< |
* For explanation, read the paper. |
34 |
> |
* For explanation, read the paper. The only (minor) algorithmic |
35 |
> |
* difference is that this version supports lazy deletion of |
36 |
> |
* internal nodes (method remove(Object)) -- remove CAS'es item |
37 |
> |
* fields to null. The normal queue operations unlink but then |
38 |
> |
* pass over nodes with null item fields. Similarly, iteration |
39 |
> |
* methods ignore those with nulls. |
40 |
|
*/ |
41 |
|
|
42 |
|
static class Node { |