Sha256: 6d0e6e7ef32d6f34ee0e622c46c136693c29baba88fb8924911fff785b0198df
Contents?: true
Size: 503 Bytes
Versions: 5
Compression:
Stored size: 503 Bytes
Contents
require 'thread' module SSHKit module Runner class Parallel < Abstract def execute threads = [] hosts.each do |host| threads << Thread.new(host) do |h| begin backend(h, &block).run rescue Exception => e e2 = ExecuteError.new e raise e2, "Exception while executing on host #{host}: #{e.message}" end end end threads.map(&:join) end end end end
Version data entries
5 entries across 3 versions & 2 rubygems