Hacker News new | past | comments | ask | show | jobs | submit login

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.



As 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: