nfsantos commented on PR #3146: URL: https://github.com/apache/jackrabbit-oak/pull/3146#issuecomment-5832017854
> You _could_ make the `hash` field volatile, which may reduce how often the "benign race" you mention happens. Not necessary for correctness, and the impact would likely not be (easily) measurable. The String class uses the same optimization and does not declare the `hash` field as volatile. I guess they have good reasons, so I will follow their example. And the computed value will be published to main memory as soon as there is a memory barrier, which I guess happens very often. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
