[Python-Dev] Re: [Stackless] comments on PEP 219

Gordon McMillan gmcm@hypernet.com
Tue, 13 Mar 2001 21:22:44 -0500


[Guido]
> I've been following this discussion anxiously.  There's one
> application of stackless where I think the restrictions *do* come
> into play.  Gordon wrote a nice socket demo where multiple
> coroutines or uthreads were scheduled by a single scheduler that
> did a select() on all open sockets.  I would think that if you
> use this a lot, e.g. for all your socket I/O, you might get in
> trouble sometimes when you initiate a socket operation from
> within e.g. __init__ but find you have to complete it later.

Exactly as hard as it is not to run() a thread from within the 
Thread __init__. Most threaders have probably long forgotten 
that they tried that -- once.

> How realistic is this danger?  How serious is this demo?

It's not a demo. It's in use (proprietary code layered on top of 
SelectDispatcher which is open) as part of a service a major 
player in the video editting industry has recently launched, 
both on the client and server side. Anyone in that industry can 
probably figure out who and (if they read the trades) maybe 
even what from the above, but I'm not comfortable saying more 
publicly.

- Gordon