[concurrency-interest] Numa and ReentrantLock

Mohit Kumar mohit.riverstone at gmail.com
Sat Feb 26 10:39:03 EST 2011

Hi Doug,

In the ConcurrentHashMap the get method does not require
"readValueUnderLock" because a racing remove does not make the value null.
The value never becomes null on the from the removing thread. this means it
is possible for get to return a value for key even if the removing thread
(on the same key) has progressed till the point of cloning the preceding
parts of the list.
This is fine so long as it is the desired effect.

But this means "readValueUnderLock" is not required for NEW memory model.

However for the OLD memory model a put may see the value null due to
reordering(Rare but possible).

Is my understanding correct.

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20110226/399d0259/attachment.html>

More information about the Concurrency-interest mailing list