Subject: Re: [boost] [context] new version
From: Oliver Kowalke (k-oli_at_[hidden])
Date: 2010-07-30 01:35:29
Am 30.07.2010 07:00, schrieb Jeffrey Lee Hellrung, Jr.:
>>> What would be the recommended method
>>> for the second context to transfer control back to the original one?
>> simply jump to it : this_context.jump_to( original_context);
> So, naturally, you have to pass some reference of the original context
> to the second one via the void* parameter, right?
yes - but if you want that the original context get executed after the
other context has finished its execution you can also pass the original
one as link parameter to the ctor of boost::context.
with jump_to() you can yield and resume a context
a linked context gets executed after the context to which it is linked
> There's no magic way to grab the context from which one came, or is there?
no - because it must not be necessarily the original context which will
be executed next (could be an arbitrary context)
ctx1 -> ctx2 -> ctx3
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk