Boost logo

Boost :

Subject: Re: [boost] [Boost.Lockfree] Interest in a ringbuffer class
From: Raphaël Londeix (raphael.londeix_at_[hidden])
Date: 2017-01-27 13:07:32


Hi guys,

I created a first draft ​
https://gist.github.com/hotgloupi/0e970a0e11091dfb0df8f942a0352b87

There's basically four types:

    struct default_ringbuffer_policies;
    template<typename Policies> struct basic_ringbuffer;
    template<typename T> struct default_ring_policies;
    template<typename T, typename Policies> struct basic_ring;

and two naive storage implementations.

basic_ringbuffer manipulates buffers, and basic_ring works on element of
types T.

The idea is basically to be able to compose types to create complete
interfaces (see
the spsc_queue definition at the end). Of course, this is nowhere near
complete, but
I hope it can give you an idea of the design.

Cheers,


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk