[Python-Dev] microthreading vs. async io

Adam Olsen rhamph at gmail.com
Thu Feb 15 16:11:43 CET 2007


On 2/15/07, Joachim König-Baltes <joachim.koenig-baltes at emesgarten.de> wrote:
> Adam Olsen wrote:
> >> I have implemented something like the above, based on greenlets.
> >
> > I assume greenlets would be an internal implementation detail, not
> > exposed to the interface?
> Yes, you could use stackless, perhaps even Twisted,
> but I'm not sure if that would work because the requirement for the
> "reads single-threaded" is the simple wait(...) function call that does
> a yield
> (over multiple stack levels down to the function that created the task),
> something that is only provided by greenlet and stackless to my knowledge.

I don't think we're on the same page then.  The way I see it you want
a single async IO implementation shared by everything while having a
collection of event loops that cooperate "just enough".  The async IO
itself would likely end up being done in C.

-- 
Adam Olsen, aka Rhamphoryncus


More information about the Python-Dev mailing list