Problem: We need access to two nodes while modifying the list - to edit the next pointers of the before and after nodes. This is tricky if we're modifying the list with different threads, since we're iterating through the list and locking as we go. That's why we do hand-over-hand locking.
Problem: We need access to two nodes while modifying the list - to edit the next pointers of the before and after nodes. This is tricky if we're modifying the list with different threads, since we're iterating through the list and locking as we go. That's why we do hand-over-hand locking.