How does Bluelet handle the case when a coroutine calls a function that itself needs to yield?
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.