Module Spawn
In: lib/spawn.rb

Methods

Classes and Modules

Class Spawn::SpawnId

Constants

RAILS_1_x = (::Rails::VERSION::MAJOR == 1) unless defined?(RAILS_1_x)
RAILS_2_2 = (::Rails::VERSION::MAJOR > 2 || (::Rails::VERSION::MAJOR == 2 && ::Rails::VERSION::MINOR >= 2)) unless defined?(RAILS_2_2)

Public Class methods

close all the resources added by calls to resource_to_close

add calls to this in your environment.rb to set your configuration, for example, to use forking everywhere except your ‘development’ environment:

  Spawn::method :fork
  Spawn::method :thread, 'development'

set the resources to disconnect from in the child process (when forking)

Public Instance methods

Spawns a long-running section of code and returns the ID of the spawned process. By default the process will be a forked process. To use threading, pass :method => :thread or override the default behavior in the environment by setting ‘Spawn::method :thread’.

Protected Instance methods

[Validate]