iopipe v0.0.4 - RingBuffers!
Ali Çehreli
acehreli at yahoo.com
Fri May 11 13:56:18 UTC 2018
On 05/11/2018 06:28 AM, Steven Schveighoffer wrote:
> 1. Ring buffers are really cool (I still love how it works) and perform
> as well as normal buffers
> 2. The use cases are much smaller than I thought
There is the LMAX Disruptor, which was open sourced a few year ago along
with a large number of articles, describing its history and design in
great detail. Because of the large number of articles like this one
https://mechanitis.blogspot.com/2011/06/dissecting-disruptor-whats-so-special.html
it's impossible to find the one that had left an impression on me at the
time I read it. The article was describing their story from the
beginning to finally getting to their current design, starting from a
simple std::map, lock contentions and other concurrency pitfall. They
finally settled on a multi-producer-single-consumer design where the
consumer works on one thread. This was giving them the biggest CPU cache
advantage.
The producers and the consumer share a ring buffer for communication.
Perhaps the example you're looking for is in there somewhere. :)
Ali
More information about the Digitalmars-d-announce
mailing list