class Concurrent::Collection::AtomicReferenceMapBackend

def attempt_internal_compute_if_absent(key, hash, current_table, i, node, node_hash)

def attempt_internal_compute_if_absent(key, hash, current_table, i, node, node_hash)
  added = false
  current_table.try_lock_via_hash(i, node, node_hash) do
    while true
      if node.matches?(key, hash) && NULL != (value = node.value)
        return true, value
      end
      last = node
      unless node = node.next
        last.next = Node.new(hash, key, value = yield)
        added = true
        increment_size
        return true, value
      end
    end
  end
ensure
  check_for_resize if added
end