Module: Enumerable

Included in:
Eye::Utils::AliveArray
Defined in:
lib/eye/utils/pmap.rb

Instance Method Summary collapse

Instance Method Details

#pmap(&block) ⇒ Object

Simple parallel map using Celluloid::Futures


4
5
6
# File 'lib/eye/utils/pmap.rb', line 4

def pmap(&block)
  map { |elem| Celluloid::Future.new(elem, &block) }.map(&:value)
end