RFR: jsr166 jdk9 integration wave 14
Martin Buchholz
martinrb at google.com
Tue Jan 31 22:55:00 UTC 2017
On Tue, Jan 31, 2017 at 12:32 PM, Paul Sandoz <paul.sandoz at oracle.com>
wrote:
>
> 1057 static final VarHandle ITEM;
> 1058 static final VarHandle NEXT;
>
> Suggest a comment as to why they are package private, due to access via a
> nested class. (Same in LinkedTransferQueue).
>
>
package private is almost always used for nestmates in j.u.c.; a comment
doesn't seem worthwhile.
>
> ConcurrentSkipListSet
> —
>
> 76 * <p>Bulk operations that add, remove, or examine multiple elements,
> 77 * such as {@link #addAll}, {@link #removeIf} or {@link #forEach},
> 78 * are <em>not</em> guaranteed to be performed atomically.
> 79 * For example, a {@code forEach} traversal concurrent with an {@code
> 80 * addAll} operation might observe only some of the added elements.
>
> toArray was removed, and it’s not atomic. Same for many other cases.
>
We tried to maintain complete lists of non-atomic operations, but those
became stale as new methods got added to superclasses/superintterfaces.
Even toString is non-atomic! Give up or be pedantically exhaustive?
More information about the core-libs-dev
mailing list