3 ms·
Bluelet: simple async I/O and green threads w/ Python coroutines
- inportb 15y agoHow does Bluelet handle the case when a coroutine calls a function that itself needs to yield?
- samps 15y agoYou 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/ http://www.python.org/dev/peps/pep-0380/