Boost logo

Boost Users :

Subject: Re: [Boost-users] [Review.Coroutine] Coroutine review comments
From: Nat Linden (nat_at_[hidden])
Date: 2012-09-10 17:11:38


On Mon, Sep 10, 2012 at 1:29 PM, Oliver Kowalke <oliver.kowalke_at_[hidden]> wrote:

> with boost.fiber you don't spawn a new thread. it is another abstraction
> over context switching /cooperative multitasking.
>
> wikipedia: ...

Thank you for clarifying. I've only just started looking over
boost.fiber documentation, but already it's clear that I don't need
Boost.Coroutine to be the same as Boost.Fiber.

Does that change my vote for inclusion of Boost.Coroutine? No: I still
want it to become a Boost library. I am a huge fan of Python
generators, and Boost.Coroutine is already more powerful than those.

I intend to look through the Boost.Coroutine examples because I
consider those an important part of a library's documentation. For one
thing, they can help give a reader a sense of the true power of this
kind of construct.

Examples I would like to see include:

- using a recursive generator to emit iterators over a tree structure
(possibly wrapped in a Boost iterator facade)
- using a generator for stateful filtering of text lines from a file
- composing a chain of such filters
- integrating such a filter with Boost.IOStreams
- using a coroutine as a stateful sink for text output, e.g. filling
output lines with variable-length items within a specified margin.

> Previously I called it stratum (stratified) but members of the developer
> list requested to rename it to fiber

Ah! I did mention your candidate Boost.Stratified library in May. I'm
glad to know that we're still talking about the same library.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net