Stackless python and microthreads

Michele Simionato michele.simionato at poste.it
Fri May 14 05:21:18 EDT 2004


"Mike C. Fletcher" <mcfletch at rogers.com> wrote in message news:<mailman.537.1084486879.25742.python-list at python.org>...
> Continuations (which are the coolest things since programming was 
> invented) were forced out of Stackless Python around the end of version 
> 2.0 for political reasons IIRC.  Current Stackless doesn't have 
> continuation support at all, so any version of micro-threads written to 
> use continuations is just dead-on-arrival for the current version.  
> Stackless 1.0 and 2.0 were only for pre-2.3 releases of Python AFAIK.
> 
> In a former life I got paid to work on extending the continuation-based 
> micro-thread implementation... continuations are the most awesome toys 
> you can imagine... we will all mourn their passing in time...
> 
> Good luck,
> Mike

Uhm ...

My experience with continuations (in Scheme) is limited, but I really
wonder if continuations have a place in a high level programming language.
I mean, continuations are basic building blocks: you can build on top
of them exception systems, generators, coroutines, microthreads, etc,
and it is an interesting learning experience to understand how this is
done.

However, to pass from continuations to something useful takes a 
LONG way. Continuations are a too low level concept. A high level language 
should already provide the right high level tools. I mean, the language 
designer should implement generators, exception systems, microthreads, etc. 
not the application programmer. When you have the high level concepts written 
down by others, you don't need continuations.

So I guess now Stackless has microthreads built inside, and the application 
programmer is not forced to write them on top of continations. 

Speaking in general, generators and the current exception system are more 
than enough for my typical needs in Python: which kind of applications do 
you have in mind where you would like to have continuations? (a part from
microthreads and things like changing the language introducing new
control structures, etc, all stuff than should not be left to the
application programmer, IMHO).

                                        Michele



More information about the Python-list mailing list