3 ms·
Further, a lot of shared data structures in super high perf C++ end up with "Free Lists" to allow multiple threads to perform atomic delete operations on the da
by ndesaulniers 11y ago
Further, a lot of shared data structures in super high perf C++ end up with "Free Lists" to allow multiple threads to perform atomic delete operations on the data structure. Point being that memory is no longer freed deterministically.
"If there's other threads working here, atomic compare and swap this pointer to the free list, otherwise last one out clean up."
Take a look at some of the code from Chapter 7 from Anthony Williams "C++ Concurrency in Action" [0].
[0] https://manning-content.s3.amazonaws.com/download/0/78f6c43-a41b-4eb0-82f2-44c24eba51ad/CCiA_SourceCode.zip https://manning-content.s3.amazonaws.com/download/0/78f6c43-...