lock-free
lock-free copied to clipboard
Lock-Free data structures
I copied the lock-free-0.1.2/lock-free/src/lock_free/dlist.d to local, and run the last unittest as main: ``` $ diff ........../.dub/packages/lock-free-0.1.2/lock-free/src/lock_free/dlist.d . 1c1,3 < module lock_free.dlist; --- > /+dub.sdl: > +/ > //module lock_free.dlist;...
https://github.com/MartinNowak/lock-free/blob/master/src/lock_free/rwqueue.d#L29 ``` void push(shared(T) t) in { assert(!full); } body ... ``` https://github.com/MartinNowak/lock-free/blob/master/src/lock_free/rwqueue.d#L38 ``` shared(T) pop() in { assert(!empty); } body ... ``` They are public methods, the caller may...
One example using cas [SharedFreelist](https://github.com/andralex/phobos/blob/b12a07f44ee68ab3acbdfe8aea7fe92300dc4530/std/allocator.d#L3191).