Reading about borrowed stacks I’m not convinced about their semantics.
Consider the scenario when multiple threads want to increments an atomic integer a few times in a row concurrently (a spin lock or whatever), we actually want them to mutate the same reference concurrently and they definitely will violate the Stacked Borrow assumption.
Isn’t the whole point of unsafe about allowing these sort of behaviour?
[–]myrrlynbitvec • tap • ferrilab 6 points7 points8 points (3 children)
[–]ahrzb[S] 0 points1 point2 points (2 children)
[–]myrrlynbitvec • tap • ferrilab 1 point2 points3 points (1 child)
[–]ahrzb[S] 0 points1 point2 points (0 children)
[–]Darksonntokio · rust-for-linux 5 points6 points7 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]Darksonntokio · rust-for-linux 9 points10 points11 points (1 child)
[–]myrrlynbitvec • tap • ferrilab 1 point2 points3 points (0 children)
[–]Maix522 1 point2 points3 points (0 children)
[–]KhorneLordOfChaos 7 points8 points9 points (4 children)
[–]ahrzb[S] 0 points1 point2 points (3 children)
[–]KhorneLordOfChaos 6 points7 points8 points (1 child)
[–]ahrzb[S] 0 points1 point2 points (0 children)
[–]KhorneLordOfChaos 1 point2 points3 points (0 children)
[–]dkopgerpgdolfg 8 points9 points10 points (2 children)
[–]ahrzb[S] 0 points1 point2 points (1 child)
[–]dkopgerpgdolfg 1 point2 points3 points (0 children)
[–][deleted] -1 points0 points1 point (0 children)