I wrote something fun during my week off: a concurrent map & set. https://gitlab.com/boats/skiplist/tree/master …
-
-
2/4) Perform a CAS operation at the lowest level to install the new node into the skiplist: new.tower[0].store(succs[0]); preds[0].tower[0].compare_and_set(succs[0], new);
-
3/4) If the CAS failed, go back to step 1. Otherwise, the new node is now a part of the skiplist. All that remains is to build the rest of the tower, i.e. initialize pointers `new.tower[1 .. new.height]`.
- 3 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.