Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

This project is no longer active. See open5 instead. http://github.com/ujihisa/open5

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 README.md
Octocat-spinner-32 tasks.gemspec
README.md

Tasks -- Better Process Manager for Ruby

Traffic Control

spawn

tasks provides spawn even in ruby 1.8.

require 'tasks'
include Tasks

pid = spawn './something.rb'
...
system "kill #{pid}"

spawn is like system with '&' and it also returns the procces id.

love_pact

tasks supports a couple to do a love pact.

require 'tasks'
include Tasks

master_pid = spawn './master.rb'
slave_pid = spawn './slave.rb'

fork do
  love_pact master_pid, slave_pid
end

If a master died, the slave dies immediately.

Note that now love_pact works only in UNIX.

Something went wrong with that request. Please try again.