

Bluelet: simple async I/O and green threads w/ Python coroutines - samps
https://github.com/sampsyo/bluelet/

======
inportb
How does Bluelet handle the case when a coroutine calls a function that itself
needs to yield?

~~~
samps
You can just yield that invocation. So saying "yield something()" will invoke
the "something" coroutine as a sub-thread of the current one, resuming the
parent coroutine when it finishes -- exactly like calling a function.

PEP 380 will solve this in an official way.
<http://www.python.org/dev/peps/pep-0380/>

