[concurrency-interest] ConcurrentHashMapV8

Bob Lee crazybob at crazybob.org
Sat Oct 8 11:33:07 EDT 2011

On Sat, Oct 8, 2011 at 3:30 AM, Doug Lea <dl at cs.oswego.edu> wrote:

> I'm not sure what you mean. The fix in V8 is to use non-write-through
> Entry objects in entrySet.toArray to avoid unwanted side effects in
> array[index].setValue().

If the user wants entries where setValue() doesn't modify the original map,
it's simpler, safer, and more efficient for the user to copy the entries
manually. It's also compatible across implementations. We needn't waste our
time and bytes making EntrySet.toArray() do something "sensible" because
users shouldn't use it anyway. Generics and arrays don't mix.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20111008/f8911e21/attachment.html>

More information about the Concurrency-interest mailing list