From: gabriele renzi Date: 2004-07-13T03:27:25+09:00 Subject: Re: ruby interpreter as mach kernel server (beside bsd) il Mon, 12 Jul 2004 12:12:04 GMT, Martin DeMello ha scritto:: >Robert Klemme wrote: > >> If String#length is a synchronus call (like it is today), you just invoke it >> and have the answer and can work with it. >> >> If it's asynchronous (as in message oriented systems) you have to place your >> request in some inbound queue and make sure, you get another event if the >> result is there. Now if the result is sent back with another message you >> have to react on it and proceed with whatever calculation you were doing and >> that needed the length of the String. >> >> Now, what's more complicated? > >This might mesh well with Oz's dataflow concurrency, where the thread >would essentially suspend itself until the value was available. I think this maps quite good to the actor model in Io (www.iolanguage.com). In Io you call a method like: obj methodname(args) and if you call it like: obj @methodname(args) it returns you a Future object. You then test the future object and in case you retriev the value: future_object isReady future_object value print Otherwise you can avoid to handle the future object like this: obj @@methodname(args) #returns nil It is an interesting model, and imho seem very OO, simple and powerful. Now if I just was good enough to implement Object#async_send() ... ;) PS I may be wrong about the syntax, not really an Io programmer