Prev Next

Java / volatile

Is reading a long/double variable is atomic?

long/double are 64-bit wide and it is read first 32 bit and next other 32 bits, so it is non-atomic.

More Related questions...

Show more question and Answers...


Comments & Discussions