roc-streaming / roc-toolkit

Real-time audio streaming over the network.
https://roc-streaming.org
Mozilla Public License 2.0
1.02k stars 203 forks source link

Implement freelist class #734

Open gavv opened 1 week ago

gavv commented 1 week ago

Subtask extracted from #602. See that task for rationale.

Add new class core::Freelist<T>, which implements lock-free free list based on this article: Solving the ABA Problem for Lock-Free Free Lists

It should be modeled after core::List<T>. It should implement lock-free LIFO based on singly linked list, with just two operations: push_back() and pop_back(). It should be intrusive, just like core::List, i.e. elements should inherit node class, so that node data is embedded into element instead of being allocated separately.

We also need to cover it with unit tests.

nataliayave commented 1 week ago

Hi, I am interesting in solving this issue. This would be my first time contributing to an open source project. Where would I find where this issue is taking place? Which file should I be working on?

gavv commented 1 week ago

Hi, thanks.

It belongs to roc_core module. See here: https://roc-streaming.org/toolkit/docs/internals/code_structure.html