Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
thfuran
on July 12, 2023
|
parent
|
context
|
favorite
| on:
Breaking java.lang.String
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
on July 12, 2023
[–]
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: