3 ms·
> Hell, that might even be slower than using a mutex? It depends, of course, on how the mutex is implemented, but yes, this is the reality a lot of times. The
by jay-barronville 2y ago
> Hell, that might even be slower than using a mutex?
It depends, of course, on how the mutex is implemented, but yes, this is the reality a lot of times.
The thing about atomics is that they can appear simple to naïve eyes, but the semantics are very difficult to get right (especially if you want your code to be portable across architectures).