Method: CouchPillow::MultiDBDirective#wait

Defined in:
lib/couchpillow/directives/multi_db.rb

#waitObject

Blocks until all pending tasks has completed. Returns the result of those tasks in an array.



54
55
56
57
58
59
60
61
62
# File 'lib/couchpillow/directives/multi_db.rb', line 54

def wait
  result = []
  until _threads.empty?
    f = _threads.shift
    result << f.value
  end

  result
end