# File lib/rake_remote_task.rb, line 625
    def execute hosts, task, args
      hosts.each do |host|
        t = task.clone
        t.target_host = host
        thread = Thread.new(t) do |task|
          Thread.current[:task] = task
          case block.arity
          when 1
            block.call task
          else
            block.call task, args
          end
          Thread.current[:task] = nil
        end
        @workers.add thread
      end
      @workers.list.each { |thr| thr.join }
    end