2 ms·
Updating an aligned pointer is atomic. If you haven’t tagged it by moving bits to a neighboring word.
by hinkley 2y ago
Updating an aligned pointer is atomic. If you haven’t tagged it by moving bits to a neighboring word.
- packetlost 2y agoI see. Yeah, you would either have to add the tagging to the upper bits of the pointer itself or concede that updates to a tagged type is not atomic. I feel like the latter is fine in most every scenario I've encountered in Rust (thanks to borrow checker rules) but in other languages the same cannot be said.