4 ms·
> It only works in the case of 1-reader + 1-writer this is what is needed 99.9% of the time. e.g. look at the number of users of this C++ SPSC queue : https://
by jcelerier 7y ago
> It only works in the case of 1-reader + 1-writer
this is what is needed 99.9% of the time. e.g. look at the number of users of this C++ SPSC queue : https://github.com/cameron314/readerwriterqueue https://github.com/cameron314/readerwriterqueue
or of the Boost one : https://github.com/search?q=boost%3A%3Alockfree%3A%3Aspsc_queue%3C&type=Code https://github.com/search?q=boost%3A%3Alockfree%3A%3Aspsc_qu...
- dragontamer 7y agoYeah, but the "queue-of-queues" is a more traditional structure familiar to people with lock-free algorithms. I don't have time to do a serious code review of everything... but immediately upon looking at that code, its already clearly written with better quality: with acquire/release fences being used in (seemingly) the correct spot (just as an example). Like, the real issue I have here is the quality of the code that is being demonstrated in the blog post. A lock-free of queues-of-queues implementation makes sense in my brain. What's going on in the blog-post ultimately doesn't make sense.