Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement freelist class #734

Open
gavv opened this issue Jun 20, 2024 · 13 comments
Open

Implement freelist class #734

gavv opened this issue Jun 20, 2024 · 13 comments
Assignees
Labels
algorithms Algorithms and data structures easy hacks The solution is expected to be straightforward even if you are new to the project help wanted An important and awaited task but we have no human resources for it yet

Comments

@gavv
Copy link
Member

gavv commented Jun 20, 2024

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 gavv added help wanted An important and awaited task but we have no human resources for it yet easy hacks The solution is expected to be straightforward even if you are new to the project algorithms Algorithms and data structures labels Jun 20, 2024
@nataliayave
Copy link

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
Copy link
Member Author

gavv commented Jun 22, 2024

Hi, thanks.

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

@gavv gavv added this to Roc Toolkit Jul 6, 2024
@gavv gavv moved this to Help wanted in Roc Toolkit Jul 6, 2024
@mihir-mihir
Copy link

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

@gavv
Copy link
Member Author

gavv commented Jul 12, 2024

@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.

@mihir-mihir
Copy link

Thanks, I've commented on #749

@gavv
Copy link
Member Author

gavv commented Jul 26, 2024

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

@mihir-mihir
Copy link

@gavv yes I'll take this one thanks

@gavv
Copy link
Member Author

gavv commented Jul 29, 2024

Awesome

@veronikaro
Copy link

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.

@mihir-mihir
Copy link

Hi @veronikaro, go ahead

@Ahilan001
Copy link

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 added a commit to Ahilan001/roc-toolkit that referenced this issue Oct 6, 2024
…on Issue roc-streaming#734. The implementation is based on the article provided in the issue and the List<T> class.
@gavv
Copy link
Member Author

gavv commented Oct 7, 2024

@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

@veronikaro
Copy link

@gavv thanks, will do! :)

@gavv gavv assigned veronikaro and unassigned mihir-mihir Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algorithms Algorithms and data structures easy hacks The solution is expected to be straightforward even if you are new to the project help wanted An important and awaited task but we have no human resources for it yet
Projects
Status: Help wanted
Development

No branches or pull requests

5 participants