[concurrency-interest] ConcurrentMap consistencyrequirementsconfusion

Zhong Yu zhong.j.yu at gmail.com
Sat Dec 10 21:50:07 EST 2011


On Sat, Dec 10, 2011 at 4:01 PM, Joe Bowbeer <joe.bowbeer at gmail.com> wrote:
> Making all variables volatile should force sequentially consistent execution
> over all, and program-order execution in each thread.
>
> I think it's reasonable to model ConcurrentMap as having a separate lock or
> volatile per cell, even though in practice the locks are striped.  Is the CM
> spec even less constrained than this?

That makes perfect sense to me. A map is basically a set of variables
with read/write operations; a concurrent map is a set of variables
with volatile read/write and cas operations on them.

Zhong Yu



More information about the Concurrency-interest mailing list