[plt-scheme] (Delimited) continuations versus threads

From: Kevin A. Smith (kevin at hypotheticalabs.com)
Date: Thu Oct 2 09:07:57 EDT 2008

On Oct 2, 2008, at 7:53 AM, Matthew Flatt wrote:

> At Wed, 01 Oct 2008 14:40:11 +0200, Jakub Piotr Cłapa wrote:
>> 1. If I understand correctly the shift/reset operator could be
>> implemented using threads. (reset starts a child thread and waits  
>> for a
>> reply sent by shift; shift sends the reply and binds k to a procedure
>> waiting for further replies). The only difference I can think of is  
>> when
>> you try to use the function created by shift multiple times (it  
>> will not
>> work with threads). Is it the only difference?
>
> Yes, that sounds right.
>
>> 2. What is the best way to write a nonblocking parser receiving data
>> from a subprocess. Using continuations and feeding new data  
>> received on
>> a port or spawning a new thread and using blocking requests?
>>
>> I think that a simple thread would be better.
>
> I agree --- it sounds like a job for threads.
>
>> Are continuations only
>> useful when we want to serialize them to disk or restart the  
>> computation
>> many times from the same break (as in HTTP)?
>
> Mainly the latter, since we don't have serializable continuations in
> the PLT Scheme core.
<snip>

Are there any plans to introduce serializable continuations?

--Kevin

>
> Matthew
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.