From: kjana@...4lab.to (YANAGAWA Kazuhisa) Date: 2002-06-28T21:19:58+09:00 Subject: Re: Transparent asynchronous execution In message <002b01c21e92$40cb77d0$0e01a8c0@fightclub> corion@informatik.uni-frankfurt.de writes: > For the implementation, almost everything seems to go smoothly except for > the delegation part. Before the result becomes available, I want the Promise > class to block the calling thread on every message sent to it (this could > maybe done by overriding Object#send), and after the result becomes > available, I want the Promise to send all messages to the result (i.e., I > want the Promise to be as transparent to the caller as possible). I've > looked at the Delegator class, but this class wants to know which object it > delegates to - the Promise dosen't know which object it will delegate to > until the result becomes available - how can I approach this problem ? You can use method_missing hack for this. May be you interested in my toy script which implements almost same functionary. In my script, Promise is a name for `delay'ed expressions whereas Future for expressions evaluated concurrently and caller wait on them. # The terms `promise' and `delay' were borrowed from Scheme, while # `future' is from Multilisp or ABCL/1. -- kjana@dm4lab.to June 28, 2002 What is done can't be undone.