Writing long and double is not atomic in Java?
It's not atomic because it's a multiple-step operation at the machine code level. That is, longs and doubles are longer than the processor's word length.
Java long and double are not atomic in 32 bit machines, but atomic in 64 bit machines with some of the 64 bit JVMs. why its dependant on machine bit length? Because 32 bit machine needs two writes for long(as long is 64 bit). Read this for detailed info.
Just to clarify the situation for Java, doubles and longs are not read or written to atomically unless they're declared volatile
JLS - Nonatomic Treatment of double and long