Class Spork::Forker
In: lib/spork/forker.rb
Parent: Object

A helper class that allows you to run a block inside of a fork, and then get the result from that block.

Example:

  forker = Spork::Forker.new do
    sleep 3
    "success"
  end

  forker.result # => "success"

Methods

abort   new   result   running?  

Classes and Modules

Class Spork::Forker::ForkDiedException

Public Class methods

Public Instance methods

abort the current running fork

Wait for the fork to finish running, and then return its return value.

If the fork was aborted, then result returns nil.

[Validate]