def run_command_parallel(meth, *args, &block)
      debug "P: #{meth} on #{@boxes.size} boxes (#{@boxes.collect {|b| b.host }.join(', ')})"
      threads = []

      raps = Rye::Rap.new(self)
      (@boxes || []).each do |box|
        threads << Thread.new do
          Thread.current[:rap] = box.send(meth, *args, &block) # Store the result in the thread
        end
      end

      threads.each do |t|
        Kernel.sleep 0.03 # Give the thread some breathing room

        begin
          t.join # Wait for the thread to finish
        rescue Exception => ex
          # Store the exception in the result
          raps << Rap.new(self, [ex])
          next
        end

        raps << t[:rap] # Grab the result
      end

      raps
    end
def run_command_parallel(meth, *args, &block)
      debug "P: #{meth} on #{@boxes.size} boxes (#{@boxes.collect {|b| b.host }.join(', ')})"
      threads = []

      raps = Rye::Rap.new(self)
      (@boxes || []).each do |box|
        threads << Thread.new do
          Thread.current[:rap] = box.send(meth, *args, &block) # Store the result in the thread
        end
      end

      threads.each do |t|
        Kernel.sleep 0.03 # Give the thread some breathing room

        begin
          t.join # Wait for the thread to finish
        rescue Exception => ex
          # Store the exception in the result
          raps << Rap.new(self, [ex])
          next
        end

        raps << t[:rap] # Grab the result
      end

      raps
    end
Run the command on all boxes in parallel