back

by dochtman·4y ago·view on hn ↗
And after some period of that it could be made unsafe in a future edition. So it’s not a totally crazy idea, but the payoff would have to be quite something.
2 comments
For most of the cases I use relaxed or have seen it being used, it seems to be a loss. It's often to e.g. increase some shared metric counters from multiple threads - where there's no real ordering concerns, and the only thing that matters is that it counts right and not when exactly he value gets visible. The cheapest possible atomic operation which can fulfill that use-case (relaxed) is fine there. Having to use `unsafe` for that doesn't seem too appealing.
You cannot currently change the API of the standard library on a per-edition basis.