From: Edd Dawson (lists_at_[hidden])
Date: 2008-05-30 16:10:41
On 30 May 2008, at 21:46, Giovanni Piero Deretta wrote:
> On Fri, May 30, 2008 at 9:19 PM, Edd Dawson <lists_at_[hidden]>
>> On 29 May 2008, at 12:49, Giovanni Piero Deretta wrote:
>>> I hope so. I've refactored coroutine's context as a (one shot)
>>> continuation, which should be usable as a generalized non local
>>> control flow abstraction.
>>> BTW, I was thinking of adding a task based interface on top of
>>> continuations in addition of a coroutine interface. Of course Edd's
>>> library would also work as well.
>> So can may I infer that you think I should be able to implement my
>> library on top of the guts of Boost.Coroutine, now?
> I certainly hope so. Look at the (one shot) continuation at
> http://tinyurl.com/55vzjm [boost trac].
> Note that:
> - I might remove the movable interface and give it sort-of-copy
> semantics (but you better not activate more than one copy: i.e. all
> copies logically refer to the same state and activating one
> immediately invalidates all other copies).
> - I will add support for passing one void* argument the the activated
That's good news! I'm too tired to wrap my brain around it at the
moment, but I'll see if I can find time to have a good look tomorrow.
>> The thing that troubled me before was how to implement a default-
>> constructed thread (or the stuff in the this_thread namespace in the
>> 1.35 API).
> I didn't allow representing the main 'thread' in boost.coroutine
> because I didn't find a way to do it without breaking typing in
> Continuations are untyped, so you can certainly do that.
Great stuff :)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk