Questions tagged [circular-list]

A circular list may be implemented using a fixed-size array (a ring buffer) or a linked list.

7 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
2k views

Disruptor pattern in a lock-free producer-consumer queue

I'm implementing a quick-and-dirty lock-free MPMC queue in C++, based on the v3 Disruptor algorithm. The implementation is pretty simple: Data to be shared between threads is stored in a ring buffer. ...
4
votes
0answers
94 views

Simple ring/circular buffer c++ class V4

As the title states, this is my 4th revision of this class. Here is the previous post if needed. I'm hoping someone experienced with things such as noexcept, ...
3
votes
2answers
209 views

Find the sum of all digits that match the following digit in a circular list

The challenge The captcha requires you to review a sequence of digits (your puzzle input) and find the sum of all digits that match the next digit in the list. The list is circular, so the digit ...
3
votes
0answers
131 views

Ring Buffer using templates/macros

I just wrote my first Nim module and was hoping someone with some experience with Nim or similar languages could take a look. In particular I was hoping someone could speak if the use of ...
2
votes
0answers
476 views

Concurrent resizable ring buffer

I'm trying to find the fastest way to enqueue and dequeue items concurrently in Go. There are some restrictions: it needs to be unbounded Memory allocation should be low Multiple producers (Single ...
1
vote
0answers
480 views

Really basic ring/circular buffer in Java

I needed a simple way to run tests on the last n bytes of data received from a socket, and a ring buffer seemed to be the most efficient way to handle it. This is a very basic buffer that stores ...
1
vote
0answers
123 views

Array slice type in Java - follow-up

See the previous iteration. I have essentially fixed most of the issues mentioned by maaartinus. However, I left the size field as it is. Namely, if the user wants ...