7 ms·
But atomicptr can be used with relaxed constraints, so in principle a consumer can see the pointed object before it was initialized. I think rust gets away bec
by gpderetta 5y ago
But atomicptr can be used with relaxed constraints, so in principle a consumer can see the pointed object before it was initialized.
I think rust gets away because atomic ptr is a raw ptr so it can only be dereferenced in unsafe code. So in practice relaxed atomics require unsafe where it matter (which makes sense to me).