Module: Enumerable

Defined in:
lib/puppet-rest/monkey_patches/enumerable.rb

Instance Method Summary collapse

Instance Method Details

#threaded_mapObject



3
4
5
6
7
8
9
# File 'lib/puppet-rest/monkey_patches/enumerable.rb', line 3

def threaded_map
  threads = []
  each do |object|
    threads << Thread.new{yield object}
  end
  threads.map(&:value)
end