public
Description: spawn plugin for Rails to easily fork or thread long-running code blocks
Home | Edit | New

Home

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

In case you’re wondering, this is the very same plugin that’s also hosted on RubyForge. The purpose of this plugin 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.

Last edited by tra, Sun Nov 22 18:02:45 -0800 2009
Home | Edit | New
Versions: