Module: Enumerable
- Defined in:
- lib/snoopy.rb
Instance Method Summary collapse
Instance Method Details
#each_simultaneously ⇒ Object
17 18 19 20 21 |
# File 'lib/snoopy.rb', line 17 def each_simultaneously threads = [] each { |e, f, i| threads << Thread.new { yield e, f, i } } return threads.each {|t| t.join } end |