Комментарии:
You spend a lot more time on producing and consuming an item than to place it into a queue or taking it from there. So there's not much likehood of a collision and you can stick with a mutex and a condvar. And lock-free queues have to be polled which is usually unacceptable.
ОтветитьWhat about memory stabilization protocols? CAS is not the interesting part of the lock free story.
Ответить