logoalt Hacker News

gpderettatoday at 4:08 PM1 replyview on HN

right, so I would expect that the equivalent of READ_ONCE is converted to an acquire in rust, even if slightly pessimal.

But the article says that the suggestion is to convert them to relaxed loads. Is the expectation to YOLO it and hope that the compiler doesn't break control and data dependencies?


Replies

bonzinitoday at 4:10 PM

There is a yolo way that actually works, which would be to change it to a relaxed load followed by an acquire signal fence.

show 1 reply