[concurrency-interest] HalfSync
David Holmes
dcholmes at optusnet.com.au
Wed May 24 18:28:24 EDT 2006
Allan Kielstra writes:
> HalfSync does make an assumption: words are written atomically
> by hardware. That wasn't always a valid assumption. If that
> assumption doesn't hold, you do lose the atomic nature of AtomicInteger.
No, Java guarantees that reads/writes are atomic for all 32-bit values, and
all volatile values (32-bit and 64-bit).
Cheers,
David Holmes
More information about the Concurrency-interest
mailing list