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

  1. Fork it ( http://github.com//spawncamp/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request