RAA - detach

detach / 1.1

Short description: Detach objects into their own process
Category: Library/Development
Status: stable
Created: 2004-01-12 03:59:53 GMT
Last update: -
Owner: evan (Projects of this owner)
Homepage: http://fallingsnow.net/ruby/
Download: http://fallingsnow.net/ruby/ruby-detach-1.1.tar.gz
License: Artistic
Dependency:
None
Description:

A very simple method that uses drb to allow any object to be detached and run it it's own process, but can be used in exactly the same way that original was used.

Example:
require 'detach'
s = "blah"
s2 = s.detach #s is now running in a seperate process
s2.size #4
s2.to_s #blah

Also features background method dispatching, which allows the caller of a method of a detach method to perform such calls non-blocking, and only when the returned object is actually used are operations blocked.

Example:
require 'detach'
u = Universe.new.detach
s = u.size # Whereas this would normally block now,
# and take a very long time, you can
# query it's running
s.ready? # false
sleep VERY_LONG_TIME
s.ready? # true
s.to_s # "about 10 billion light years in radius"

Edit this project (for project owner)

back to RAA top