EasyDispatch
Super simple concurrecy in ruby
Installation
Add this line to your application's Gemfile:
gem 'easy_dispatch'
And then execute:
$ bundle
Or install it yourself as:
$ gem install easy_dispatch
Usage
Apply function to array, concurrently
Synonymous to GCD's dispatch_apply:
[0,1,10,20].apply(2) do |i|
puts i
end
this will invoke the block for each object in the array, but with a concurrency of 2
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request