[plt-scheme] Asynchronous Let

From: Erich Rast (erich at snafu.de)
Date: Thu Jul 5 11:25:35 EDT 2007

Am 05.07.2007 um 16:25 schrieb Chongkai Zhu:

> This `let/async' you want is not hard: using syntax-rules only is  
> enough.
<snip code>

Thanks a lot!!! That was exactly what I was looking for! Thanks to  
your help, I've saved a lot of brain cells (but haven't become  
smarter either) :-)

>> I'd like to use this idiom for writing asynchronous operations,
> particularly with socket connections, in an easy to read style. Or  
> is  there a better way to do this?
> The way exception is bound to "name"s doesn't seems natural to me.

I agree with that, though this hopefully makes sense in this  
particular case, as I'd like the other threads to finish gracefully  
when one of them raises an exception.

Am 05.07.2007 um 16:32 schrieb Shriram Krishnamurthi:

> Right now I don't really see what
> advantage you're getting at all: you say that you want the body to
> evaluate only after the thread finishes, at which point...why not just
> use LET?

let/async synchronizes several threads. But I don't think either   
that there is any advantage over this construct to futures. I just  
figured that if I would have asked someone on the list to give me a  
complete implementation of futures, nobody might have volunteered... ;-)

BTW, is there some implementation of futures for current MzScheme or  
R5RS that I've missed?



Posted on the users mailing list.