Hemera :ms_snow_leopard: on Nostr: I tried to write some ~smart~ #rust code yesterday, and since it uses unsafe I knew ...
I tried to write some ~smart~ #rust code yesterday, and since it uses unsafe I knew that I couldn't rely on it by intuition alone (what am I? A C programmer? )
Well, I was wrong! The way Arc is written means that what I tried to do is racy and thus UB.
Thank you Rust community, and specifically H2CO3 and steffahn for writing such great responses, for being there and just being great!
While I didn't expect any belittling at all, there could have been, and instead it was just 'hey nice try, but that doesn't work ' + some explanation.
<3
https://users.rust-lang.org/t/is-this-cyclic-arc-constructor-sound/99455
Well, I was wrong! The way Arc is written means that what I tried to do is racy and thus UB.
Thank you Rust community, and specifically H2CO3 and steffahn for writing such great responses, for being there and just being great!
While I didn't expect any belittling at all, there could have been, and instead it was just 'hey nice try, but that doesn't work ' + some explanation.
<3
https://users.rust-lang.org/t/is-this-cyclic-arc-constructor-sound/99455