4 ms·
How does Bluelet handle the case when a coroutine calls a function that itself needs to yield?
by inportb 15y ago
How 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/