[pypy-dev] update on CPython coroutine
Stephan Diehl
stephan.diehl at gmx.net
Sat Dec 16 10:28:18 CET 2006
Hi all,
after my (unsuccessful:-) attempt to place CPython runnable coroutines
into py.magic (they might end up there just after the next release,
we'll see), they live now in
http://codespeak.net/svn/user/stephan/hacks/coroutine/coroutine.py
In order to use them, on must place that file into the python path.
I've fixed a couple of things, Armin pointed out to me. I'd be happy to
get some feedback.
Background: the pypy.lib.stackless_new implementation relies only on
coroutines as a special requirement.
If one had coroutines that were running on CPython, one could run have
the stackless interface on CPython as well (minus the pickling, of course).
It turned out that the coroutine interface is so similar to the greenlet
one, that just a few lines of code are enough to provide the coroutine
interface to greenlets.
Have a nice weekend
Stephan
More information about the pypy-dev
mailing list