class Bundler::ParallelInstaller

def enqueue_specs

are installed.
previously installed specifications. We continue until all specs
Later we call this lambda again to install specs that depended on
We enqueue all gem specs that do not have any dependencies.
Keys in the remains hash represent uninstalled gems specs.
def enqueue_specs
  installed_specs = {}
  @specs.each do |spec|
    next unless spec.installed?
    installed_specs[spec.name] = true
  end
  @specs.each do |spec|
    if spec.ready_to_enqueue? && spec.dependencies_installed?(installed_specs)
      spec.state = :enqueued
      worker_pool.enq spec
    end
  end
end