Fibre
Fibre - fiber pool with events
Installation
Add this line to your application's Gemfile:
gem 'fibre'
And then execute:
$ bundle
Or install it yourself as:
$ gem install fibre
Initialize pool:
Fibre.pool_size = 10
Usage
Fibre.pool_size = 10
Fibre.pool.checkout do
puts "runned in fiber"
end
# some fiber raised exception
using EventObject
Fibre.pool.on :error do |e|
puts e.to_s
exit
end
Contributing
- Fork it ( https://github.com/chelovekov/fibre/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request