mthornton at optrak.com
Fri Oct 7 10:45:41 EDT 2011
On 07/10/11 15:32, David M. Lloyd wrote:
> Yeah, but I think that's not outside of what should be reasonably
> expected when you iterate a (non-COW) concurrent hash map. As you
> say, hasNext()/next() can be made consistent by actually getting a
> snapshot ref to the next entry in hasNext(), but it doesn't have to be
> a copy of the Entry, it can still be the literal Entry in the map.
I have several nonconcurrent map implementations which do not have Entry
instances internally --- they are created on the fly as needed to
satisfy the entrySet requirements. I usually do this where I can't
afford the space required by literal Entry instances.
More information about the Concurrency-interest