20 Jun
2014
20 Jun
'14
9:10 a.m.
On Fri, Jun 20, 2014 at 9:39 AM, bbxiong
Is any limitation makes a push_coroutine must be caller and pull_coroutine must be the coro?
Why not swap coro_pull and coro_push like this:
...
This still works on my machine, and has no extra "call to caller()", push_coroutine is not invoked until we explicitly run it (while pull_coroutine is invoked in constructor).
So, my question is, s there any bad effects by using coroutines in this way?
Without having read through your change carefully, my thought is that it should be fine. The await_emu example is a proof of concept. If the change works on your machine, it's probably okay.