On Thu, Jan 15, 2004 at 09:31:39AM +0100, Leopold Toetsch wrote: > I don't see any advantage of such a model. The more as it doesn't > gurantee any atomic access to e.g. long or doubles. The atomic access to > ints and pointers seems to rely on the architecture but is of course > reasonable.
You *can't* guarantee atomic access to longs and doubles on some architectures, unless you wrap every read or write to one with a lock. The CPU support isn't there. (Why the "e.g."? Longs and doubles are explicitly the only core data types which the JVM does not guarantee atomic access to.) - Damien