Skip to content

Implement freelist class #734

@gavv

Description

@gavv

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.

Metadata

Metadata

Assignees

Labels

C-algorithmscategory: Algorithms and data structureseasy hacksSolution requires minimal project contexthelp wantedLooking for contributors

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions