a port of the lockfree skiplist (and list) to C++ from "the art of multiprocessor programming"

this can be optimized further if you remove the java-like abstractions i implemented, and you can get a solid T type instead of the void* data i used if you inline all the abstraction helpers instead of using them but it makes the code less clear

as it stands i used void* data for a reason so i could maintain the same abstraction as 'atomicmarkablereference' and behavior as java and result in a working port

this can be accounted for if you want to recode the class to have all the CAS and other functions inline

either way this is a decentish reference on how to implement something like the book in C++ -- with memory management hinted at (full epochmanager not included in this project so this demo does leak without teh full implementation)

Edit:

Technical challenges to this port and tips on porting java lock free code to c++:

-porting java lock free semantics to C++ and how to do it:

this was a real challenge to port to C++ successfully and actually get the locks to function but if you do this and consider non traditional options you can successfully port java lock free semantics to C++

submitted by /u/Slight-Abroad8939
[link] [comments]