Boost logo

Boost :

Subject: Re: [boost] {Review] Coroutine reviewstarts today, September 3rd
From: Eugene Yakubovich (eyakubovich_at_[hidden])
Date: 2012-09-11 15:31:11


> The review of Oliver Kowalke's Boost.Coroutine library starts today,
> September 3rd 2012, and will end on September 12th.
> I really hope to see your vote and your participation in the discussions on
> the Boost mailing lists!
>
>
> Please always state in your review, whether you think the library should be
> accepted as a Boost library!

YES, I think it should be accepted.

>
> Additionally please consider giving feedback on the following general
> topics:
>
> - What is your evaluation of the design?

Overall, I like the design. coroutine class design is very good. As
others have pointed out, it has some sharp edges (e.g. accessing
coroutine-function arguments after first yield can cause access to bad
memory) but I think that it is not a showstopper. I view coroutine
class as a more advanced usage so some caution will be required. I
would like to see symmetric coroutines in the future, though.

I spent most of the time studying generator class. I think generators
are easier to grasp and thus will be used more often (especially by
novices). Like outlined in the previous posts, I would like to have
generator-functions return void (Oliver already implemented this on a
branch); have iterator support for use with algorithms and
BOOST_FOREACH/C++11 range-based for; and address the danger associated
with using pointer/reference types (either change the design or
clearly document them).

I also agree that having support for memory allocator (beside stack
allocator) is a good idea and that they should both be type erased.

> - What is your evaluation of the implementation?
I did not study it in great detail but what I saw was of very good quality.

> - What is your evaluation of the documentation?
Good. There are some mistakes but others have already pointed them out.

> - What is your evaluation of the potential usefulness of the library?
Extremely useful. Should make event based applications easier to
write. Will greatly simplify writing stateful iterators.

> - Did you try to use the library? With what compiler? Did you have any
> problems?
Yes. I used GCC 4.6.3 with no problems. I tried Clang 3.1 but it fails
to compile -- simply including boost/coroutine/all.hpp generates
errors.

> - How much effort did you put into your evaluation? A glance? A quick
> reading? In-depth study?
I spent a few hours studying the library, experimenting, reading
background info (e.g. Giovanni's original documentation).

> - Are you knowledgeable about the problem domain?
Only in that I have used generators/coroutines in Python for a number
of years. I have also written many event based applications in C++ and
can appreciate the need for coroutines in that domain.

Regards,
Eugene


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