In the lock-free universal construction, every thread has its own view of the head pointer. To append a new method invocation, at line14of a thread selects the furthest among these head pointers.
Node before = Node.
max(head);Consider changing this line to: Node before = head[i];Does the construction still work?
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here