Boost logo

Boost :

Subject: Re: [boost] [Review.Coroutine] Some comments
From: Christopher Kormanyos (e_float_at_[hidden])
Date: 2012-09-09 09:55:20


>>>>>>> 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) :)

> Best, Vicente

I understand. Thank you.

Best regards, Chris.


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