Skip to content
tra edited this page Aug 22, 2011 · 6 revisions

Please checkout the latest version on the ‘edge’ branch to see what’s under development

The purpose of this gem is to provide a dead-simple way to fork (or thread) off a long-running section of code so that your application can get on with the task of serving the user. Here’s an example:

  spawn do
    do_some_slow_running_thing
  end

Spawn knows how to handle database connections so that your spawn block and the main program each will access your database with a different connection. Basically that’s all there is to it but if you want to know more suggest you peruse the README file for all the details.
Clone this wiki locally