Project

parallel2

0.0
No commit activity in last 3 years
No release in over 3 years
Parallel#each and Parallel#map are using Celluloid::Future
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

= 0.10.0
 Project Readme

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