Note that since we allow the client to allocate the Node passed into push, this implementation is only correct if we assume that the client never pushes in duplicate Nodes (same pointers). Otherwise we could have issues where we push A,B,A onto the stack resulting in both A's next pointer to be B.
Levy
This is also the screening question of MemSQL at CMU ToC 2016 ;)
Finding them and you will get 20 dollars lol
tarabyte
Is there a way to do this without DCAS such that it is still non-blocking? Thanks! :)
Note that since we allow the client to allocate the Node passed into push, this implementation is only correct if we assume that the client never pushes in duplicate Nodes (same pointers). Otherwise we could have issues where we push A,B,A onto the stack resulting in both A's next pointer to be B.
This is also the screening question of MemSQL at CMU ToC 2016 ;) Finding them and you will get 20 dollars lol
Is there a way to do this without DCAS such that it is still non-blocking? Thanks! :)