roc-toolkit icon indicating copy to clipboard operation
roc-toolkit copied to clipboard

Implement freelist class

Open gavv opened this issue 1 year ago • 13 comments

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.

gavv avatar Jun 20 '24 13:06 gavv

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?

nataliayave avatar Jun 21 '24 21:06 nataliayave

Hi, thanks.

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

gavv avatar Jun 22 '24 05:06 gavv

I'd be interested in giving this one and/or #602 a shot, @nataliayave are you still working on this? I can pick up #602 after if you are, otherwise I can take both

mihir-mihir avatar Jul 08 '24 20:07 mihir-mihir

@mihir-mihir While we're waiting for reply from Natalia, probably you'd be interested in #749, which is also about lock-free programming.

UPD: Oh, and there is also #362, which was abandoned a while ago, but I think is pretty interesting.

gavv avatar Jul 12 '24 10:07 gavv

Thanks, I've commented on #749

mihir-mihir avatar Jul 12 '24 15:07 mihir-mihir

@mihir-mihir I guess we can assume that the issue is free, please ping me if/when you want to be assigned.

gavv avatar Jul 26 '24 23:07 gavv

@gavv yes I'll take this one thanks

mihir-mihir avatar Jul 29 '24 01:07 mihir-mihir

Awesome

gavv avatar Jul 29 '24 04:07 gavv

Hey @mihir-mihir, are you still working on this? @gavv if not, could you please assign me to the issue? I would like to give it a go.

veronikakurth avatar Oct 05 '24 08:10 veronikakurth

Hi @veronikaro, go ahead

mihir-mihir avatar Oct 05 '24 15:10 mihir-mihir

Hi, I know I didn't request the issue here, but I have been working on it too. I am going to finish working on the issue today, so would it be okay to make a pull request when I finish it?

Ahilan001 avatar Oct 06 '24 02:10 Ahilan001

@Ahilan001 The patch you sent is confusing, looks like some random pieces of code?.. And it doesn't compile. Also please read coding guidelines: https://roc-streaming.org/toolkit/docs/development/coding_guidelines.html

Veronika, it would be great if you could take this issue :) @veronikaro

gavv avatar Oct 07 '24 19:10 gavv

@gavv thanks, will do! :)

veronikakurth avatar Oct 07 '24 20:10 veronikakurth

Hi, I can follow up on this if u guys let me, as well as #602.

Flw5469 avatar Jan 16 '25 17:01 Flw5469

@Flw5469 Thanks. We currently have PR #783 that is pretty close to what we need.

Let's first ask Veronika what plans does she have on that PR. @veronikaro

gavv avatar Jan 16 '25 18:01 gavv

@gavv @Flw5469 hi guys, sorry for the delay - quite busy recently. I have some time now and will try to wrap it up in the upcoming days!

veronikakurth avatar Jan 16 '25 22:01 veronikakurth

@veronikaro Thanks, and no hurry.

gavv avatar Jan 17 '25 06:01 gavv

Implemented in #783

gavv avatar Jun 05 '25 16:06 gavv

Thanks everybody involved, #602 is now unblocked.

gavv avatar Jun 05 '25 16:06 gavv