4 ms·
You can’t do that without a mutex. This provides a way to read a consistent snapshot of multiple atomic values without a mutex. Obviously you could just use a
by slashdev 3y ago
You can’t do that without a mutex. This provides a way to read a consistent snapshot of multiple atomic values without a mutex.
Obviously you could just use a mutex. This may perform better under some workloads, especially if writes are very rare.