Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/armada/utils/array.rb
Instance Method Summary collapse
Instance Method Details
#each_in_parallel(&block) ⇒ Object
2 3 4 5 6 7 8 |
# File 'lib/armada/utils/array.rb', line 2 def each_in_parallel(&block) threads = map do |s| Thread.new { block.call(s) } end threads.each { |t| t.join } end |