Boost logo

Boost Users :

Subject: Re: [Boost-users] [coroutine] await_emu example
From: Nat Goodspeed (nat_at_[hidden])
Date: 2014-06-20 05:10:50

On Fri, Jun 20, 2014 at 9:39 AM, bbxiong <bbxiong.xiao_at_[hidden]> wrote:

> 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.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at