[concurrency-interest] concurrency puzzle

Peter Veentjer alarmnummer at gmail.com
Tue Sep 12 15:06:03 EDT 2006


I you look at the following documentation:

http://www.cs.umd.edu/~pugh/java/memoryModel/jsr-133-faq.html#volatile

They talk about cache invalidation:
if a lock is obtained, the cache is invalidated.

So occording to this documentation, the write x=20 could get lost if
it isn't flushed to main memory and this makes 0 a possible output
value.

So what should I believe?


More information about the Concurrency-interest mailing list