On Sun, 24 May 2020 at 22:38, Gavin Lambert via Boost
On 22/05/2020 10:17, Andrey Semashev wrote:
Some time ago I have proposed to include ring_queue and small_ring_queue containers to Boost.Container:
https://github.com/boostorg/container/pull/121
The ring queues work similarly to std::queue with the main difference being that they use a ring buffer internally to store elements. The small_ring_queue also allows to allocate a static storage for a fixed amount of elements. The benefit of this is that dynamic memory allocations can be practically avoided when the number of enqueued elements does not exceed some limit.
Boost.Lockfree [1] already contains such a queue (which operates similar to a ring-buffer when set to fixed capacity, but can be configured to be dynamic).
I reacted earlier in this thread and was erroneously babbling on about unbounded circular lists. You will say I'm a lousy reader, I on the other hand could not imagine you would not use https://www.threadingbuildingblocks.org/docs/help/reference/containers_overv... for one moment (i.e. that that problem was covered). Is Boost.Lockfree being developed? degski -- @systemdeg "We value your privacy, click here!" Sod off! - degski "Anyone who believes that exponential growth can go on forever in a finite world is either a madman or an economist" - Kenneth E. Boulding "Growth for the sake of growth is the ideology of the cancer cell" - Edward P. Abbey