Class: SSHKit::Custom::Runner::Parallel

Inherits:
Abstract
  • Object
show all
Defined in:
lib/sshkit/custom/runner/parallel.rb

Overview

A runner which executes all commands in prallel (different threads).

Instance Attribute Summary

Attributes inherited from Abstract

#backends, #options

Instance Method Summary collapse

Methods inherited from Abstract

create_runner, #initialize, #send_cmd

Constructor Details

This class inherits a constructor from SSHKit::Custom::Runner::Abstract

Instance Method Details

#apply_block_to_bcks(&block) ⇒ Object

Executes all commands parallel



15
16
17
18
# File 'lib/sshkit/custom/runner/parallel.rb', line 15

def apply_block_to_bcks(&block)
  futures = to_futures(&block)
  futures.each { |f| f.value }
end