Boost logo

Boost :

From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2008-05-30 15:46:28

On Fri, May 30, 2008 at 9:19 PM, Edd Dawson <lists_at_[hidden]> wrote:
> 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 [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

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

I'm willing to do change the continuation interface if it can help you
implement the boost thread interface.


Boost list run by bdawes at, gregod at, cpdaniel at, john at