17 Jun
2017
17 Jun
'17
8:49 p.m.
Gottlob Frege wrote:
https://github.com/boostorg/smart_ptr/commit/2964ed2379cf47778b18954b8d3501f...
I have enormous faith in you, however, this is the simplest implementation I've seen. I assume that is because it is not lock-free? Or is it because it doesn't actually work?
I made it a bit more complex: https://github.com/boostorg/smart_ptr/commit/67d897a5330e99821adcebc82f605dd... The reason it was so simple was because it was using the already existing atomic functions. And no, it's not lock-free. Lock-freedom requires significantly more complexity (and a double-width CAS).