
27 Mar
2011
27 Mar
'11
1:33 p.m.
Am 27.03.2011 15:03, schrieb Gordon Woodhull:
On Mar 27, 2011, at 8:48 AM, Gordon Woodhull wrote:
I ended up having to wrap contexts up in shared_ptrs in order to get my example to work Of course, looking at the examples, I realize I didn't actually have to do this, a simple forward declaration would have done the trick.
It does look like Coroutine's yield() nicely avoids the problem of each function having to know the other's context.
yes - boost.context is only a building block. boost.tasklet (as a higher level abstraction) provides such a facility too -> boost::this_tasklet::yield() suspends the current execution context. Oliver