Yes, You Have Been Writing SPSC Queues Wrong Your Entire Life
Henrique Bucher
Henrique Bucher
Financial Engineer | Substack Bestseller Author | C++/FPGA/Quant/Trading/HFT/ULL | PhD/MSc/BSc Engineering
Recently a post on Hacker News by Juho Snellman showed that he has been writing single producer, single consumer queues his entire life and presented a solution for it.
In this article we show that his solution can be yet improved with a simple but effective trick such that indices are kept bounded.
Article: https://www.vitorian.com/x1/archives/370
Consultant, Data Science and Quantitative Research at Quantitative Technologies (CANADA)
7 年No paywall when I just tried from a Canadian IP address.
Executive Director - Quant - Tech Lead - C++ & Python
7 年You might be interested in : https://www.drdobbs.com/parallel/lock-free-queues/208801974
Consultant, Data Science and Quantitative Research at Quantitative Technologies (CANADA)
7 年For comparison, there is also boost::lockfree::spsc_queue.