class Concurrent::LockFreeStack

def pop

Returns:
  • (Object) -
def pop
  while true
    current_head = head
    return current_head.value if compare_and_set_head current_head, current_head.next_node
  end
end