[Stackless] Does stackless only work with pure Python codes?

Limin Fu fulimin_yuan at yahoo.com
Fri Nov 26 21:29:30 CET 2004

> If a C module is running, Stackless can't do
> anything.
> If the C module calls back into Python and executes
> bytecodes, then Stackless is active, again, and it
> is
> possible to switch tasklets, even if there is still
> an active C function on the C stack. In this
> situation,
> Stackless modifies the C stack to perform switches.
> This way of switching has been the one and only in
> Stackless 2.0. In 3.0, I try to avoid fiddling the
> C stack at all, because it is much faster. But for
> cases like this, it is a powerful technique.

Is it very complicated? Is there any reference
about this technique?

> Again to your question: If a C extension happens
> to stay in C code for a long time, then we cannot
> switch during this time. It would be easy to modify
> the extension a bit and make it run a few bytecodes
> from time to time, or have it explicitly run the
> stackless "schedule" function in order to give up
> its time slice.

That's what I guessed. ciao,

Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list