What you are looking for is called "trampoline".
There's an implementation of trampoline that utilizes generators, which I think is very elegant. The basic idea is that when you yield a generator (B) in a gnenrator (A), the executor will run that generator (B) and send the return value back to the caller generator (A).