Consider the following C struct:
struct LinkedList<T> {
next: AtomicPtr<LinkedList<T>>,
prev: AtomicPtr<LinkedList<T>>,
data: T
}
and imagine we allocate a whole bunch of them at once via malloc.
====
Is there something like this for Rust, where we can return a LinkedList<T>
or get a LinkedList<T>
from a pool, and have all this be concurrent and lock free ?
I understand this can be done via Atomics. I am wondering if someone has already done this. Only working on x86_64 linux is fine.