Module: ArrayThreadedEnumerable
- Defined in:
- lib/dispatch_queue.rb
Instance Method Summary collapse
Instance Method Details
#threaded_each ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/dispatch_queue.rb', line 14 def threaded_each threads = [] each { |value| threads << Thread.new { yield value } } threads.each{|t| t.join} end |