lib/vagrant/zscp/command/zscp.rb in vagrant-zscp-0.1.2 vs lib/vagrant/zscp/command/zscp.rb in vagrant-zscp-0.1.3
- old
+ new
@@ -42,11 +42,18 @@
# Get the SSH info for this machine so we can access it
ssh_info = machine.ssh_info
# Sync them!
+ sync_threads = []
folders.each do |id, folder_opts|
- ZscpHelper.scp(machine, ssh_info, folder_opts)
+ sync_threads << Thread.new(id, folder_opts) do |id, folder_opts|
+ ZscpHelper.scp(machine, ssh_info, folder_opts)
+ end
+ end
+
+ sync_threads.each do |t|
+ t.join
end
end
return error ? 1 : 0
end
\ No newline at end of file