...
Wiki Markup |
---|
*CON27-EX1:* The noncompliant form of the double-checked locking idiom can be used for for 32-bit primitive values (for example, {{int}} or {{float}}) \[[Pugh 04|AA. Java References#Pugh 04]\]. Note that it does not work for {{long}} or {{double}} because unsynchronized reads/writes of 64-bit primitives are not guaranteed to be atomic (see [CON05VNA05-J. Ensure atomicity when reading and writing 64-bit values].) |
...