Boost logo

Boost :

Subject: Re: [boost] [Review.Coroutine] Some comments
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2012-09-09 06:19:01


Am 08.09.2012 21:57, schrieb Vicente J. Botet Escriba:
> Le 08/09/12 20:05, Christopher Kormanyos a écrit :
>>> Am 08.09.2012 16:25, schrieb Vicente J. Botet Escriba:
>>>>>>> On solution could be to make coroutine non-copyable,
>>>>>> Is coroutine copyable?
>>>>> moveable-only - I mean to derive from boost::noncopyable
>>>> I'm lost. How this can help here?
>>> I was thinking about to make coroutine deriving from
>>> boost::noncopyable and not moveable-only.
>>> Then I could refactor coroutine that it does not need
>>> to allocate memory for inner classes.
>>> The user can decide if the coroutine instance is allocated
>>> on the stack or in the freestore and which technique is used.
>> Well, if it were my design, I would make coroutine non-copyable
>> and simply forget about all the related troubles of copy semantics.
>> Furthermore, I would entirely avoid the use of dynamically allocated
>> resources and a coroutine allocator.
>>
>> But, of course, I am predominantly interested in using coroutine
>> in embedded systems that lack a heap and benefit from the predictability
>> of statically allocated resources. As you already mentioned
>> in various communications, though, we can work on a lightweight
>> embedded version in the future.
>
> The suggested Allocator is just there to responds to your need
> (predictability) :)
>
solved - allocator can be passed to coroutine/generators ctor :

git://gitorious.org/boost-dev/boost-dev.git (branch coroutine)


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