def wait_for(*dependencies)
      return nil if @serial
      return nil if dependencies.empty?

      dep_set = dependencies.to_set
      until dep_set & solved == dep_set
        sleep 1
        @solver_thread.join unless @solver_thread.alive?
      end
    end
def wait_for(*dependencies)
      return nil if @serial
      return nil if dependencies.empty?

      dep_set = dependencies.to_set
      until dep_set & solved == dep_set
        sleep 1
        @solver_thread.join unless @solver_thread.alive?
      end
    end
Sleep until this list of dependencies are resolved. In parallel mode, will
 raise if an exeception occurred while waiting for these resources. In
 serial mode, wait_for just returns nil.