Boost logo

Boost :

Subject: Re: [boost] [context] review
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2011-03-27 09:33:07


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


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk