3 ms·
Hmm. This seems like a good use of lock-free programming. Its not a technique you want to use very often (lock-free is known by a small minority of programmers,
by dragontamer 6y ago
Hmm. This seems like a good use of lock-free programming. Its not a technique you want to use very often (lock-free is known by a small minority of programmers, and is difficult to do), but... if mutexes can't work and you only can rely upon memory-level assumptions... that's the sort of stuff that load_acquire() and store_release() was made for. (As well as atomics, with associated memory orderings)