||Detach objects into their own process
||2004-01-12 03:59:53 GMT
(Projects of this owner)
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.
s = "blah"
s2 = s.detach #s is now running in a seperate process
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.
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
s.ready? # true
s.to_s # "about 10 billion light years in radius"