
On Fri, May 30, 2008 at 9:19 PM, Edd Dawson <lists@mr-edd.co.uk> 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 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 continuation.
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 general. 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. -- gpd -- gpd