Spawncamp
Small library for spawning and managing child processes
Installation
Add this line to your application's Gemfile:
gem 'spawncamp'
And then execute:
$ bundle
Or install it yourself as:
$ gem install spawncamp
Usage
simply include the library and have access Spawncamp::spawn and Spawncamp::spawn_loop
Spawncamp::spawn
include Spawncamp
proc = puts 'child_process'
spawn(proc)
spawn(proc)
spawn(proc)
spawn(proc)
spawn(proc)
Spawncamp::spawn_loop
spawning loops is drastic so beware, this is a non killable process
include Spawncamp
proc = puts 'constant process i will never die!'
spawn_loop(proc)
API
generate api docs by running
$ rake docs
Contributing
- Fork it ( http://github.com/
/spawncamp/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 new Pull Request