lib/vagrant/batch_action.rb in vagrant-unbundled-1.9.1.1 vs lib/vagrant/batch_action.rb in vagrant-unbundled-1.9.5.1
- old
+ new
@@ -121,18 +121,20 @@
end
# Set some attributes on the thread for later
thread[:machine] = machine
- thread.join if !par
+ if !par
+ thread.join(THREAD_MAX_JOIN_TIMEOUT) while thread.alive?
+ end
threads << thread
end
errors = []
threads.each do |thread|
# Wait for the thread to complete
- thread.join
+ thread.join(THREAD_MAX_JOIN_TIMEOUT) while thread.alive?
# If the thread had an error, then store the error to show later
if thread[:error]
e = thread[:error]
# If the error isn't a Vagrant error, then store the backtrace