[concurrency-interest] Use Of putOrderedObject In ConcurrentHashMap Constructor
martinrb at google.com
Fri Mar 8 16:58:21 EST 2013
On Fri, Mar 8, 2013 at 6:34 AM, Richard Burnison <richard at burnison.ca>wrote:
> As of hg-005c0c85b0de, the main constructor in ConcurrentHashMap writes its
> initial Segment, s0, into a Segment array, ss, using
> Unsafe.putOrderedObject(ss, SBASE, s0). Subsequently, the final instance
> field, segments, is set to ss.
The latest version of ConcurrentHashMap no longer uses segments.
That said, it looks to me like you are right, and the call
to putOrderedObject is not strictly necessary.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest