Skip to content
Parallel#each and Parallel#map are using Celluloid::Future (Experimental)
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples
lib
spec
.gitignore
Gemfile
LICENSE
README.md
Rakefile
parallel2.gemspec

README.md

Parrallel2

Parallel#each and Parallel#map are using Celluloid::Future

require 'parallel2'

list = [1,10,2,9,3,8,4,7,5,6]
Parallel.each(list) do
  sleep i
  puts "#{i} fired!"
end

results = Parallel.map(list) do
  sleep i
  puts "#{i} fired!"
  i * 2
end
Something went wrong with that request. Please try again.