Stuart Marks on Nostr: nprofile1q…6gyrf The actual rules are really hard to understand 😇 (see JLS 17.4) ...
nprofile1qy2hwumn8ghj7un9d3shjtnddaehgu3wwp6kyqpqf3nlrmpjja65pzmvlegyl27l0y2m007nncxttdwqndrejajvdzask6gyrf (nprofile…gyrf) The actual rules are really hard to understand 😇 (see JLS 17.4) but AIUI informally any read must see either the initial value or some previously written value. The data race is that we don’t know *which* value. So this looks more like what C++ calls unspecified behavior than undefined behavior. At least that’s how I think about it. We haven’t discussed this much in the Java world though.
https://docs.oracle.com/javase/specs/jls/se23/html/jls-17.html#jls-17.4
https://docs.oracle.com/javase/specs/jls/se23/html/jls-17.html#jls-17.4