ANN: Object#detach and background method dispatching

Now available on raa.ruby-lang.org:

Object#dispatch - 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”

Evan Webb // evan@fallingsnow.net