3 ms·
If you read a double or long while writing to it from another thread, you are not guaranteed to read a value that was ever explicitly set because they update 32
by thfuran 3y ago
If you read a double or long while writing to it from another thread, you are not guaranteed to read a value that was ever explicitly set because they update 32 bits at a time rather than atomically.
- kaba0 3y agoAs per the specification, you are right. As per the actual implementation, no :D it is as cheap, if not cheaper to set it atomically on 64-bit.
- deleted 3y ago[deleted]