|
Boost : |
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2021-11-29 15:56:00
On Sat, Nov 27, 2021 at 10:50 PM Oliver Kowalke via Boost
<boost_at_[hidden]> wrote:
> I'd like to propose the new library boost.spawn (https://olk.github.io/)
> for review.
> boost.asio's boost::asio::spawn() uses the deprecated and inefficient
> boost.coroutine library.
> boost.spawn provides the same functionality while using boost.context's
> fiber directly.
I like the direction this library takes, and I have a use for
something like this myself in Boost.JSON. Specifically, to implement a
generator which does pull parsing of JSON. This will make the
implementation of parsing directly into structs more simple and
robust. I also like the simplification over push/pull, which never
really made sense to me.
However, this library should not depend on Asio. The fiber
functionality provided by boost.spawn is useful enough that people
will want to use it in more situations than just Asio. What will
standalone Asio use? It is worth considering a standalone version of
this library (or perhaps just not depend on any other Boost
libraries).
Have you considered just rolling this into Boost.Context? That library
is sort of not particularly useful on its own. I would like to see an
example of a generator using boost.spawn. A simple fibonacci producer
would suffice. This library also needs more examples that don't
require Asio.
Thanks
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk