Boost logo

Boost :

From: Casey Bodley (cbodley_at_[hidden])
Date: 2021-11-29 18:11:36

On Sun, Nov 28, 2021 at 1:50 AM Oliver Kowalke via Boost
<boost_at_[hidden]> wrote:
> Hi,
> I'd like to propose the new library boost.spawn (
> 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.
> Oliver
> _______________________________________________
> Unsubscribe & other changes:

thanks for proposing this, Oliver!

as a satisfied user, i'd like to express my support. the Ceph project
has been maintaining a fork of this work at, and it's been running in production
for nearly 2 years now in our Ceph Object Gateway [1] component

for us, the crucial feature of this fork is its ability to customize
the StackAllocator. the original boost::asio::spawn() offers limited
customization through boost::coroutines::attributes [2], but that only
covers the stack size and unwind behavior. Oliver's fork allows you to
pass in any object meeting the requirements of boost::context's
StackAllocator concept [3], and the context library provides several
options here. you can read a bit more about our use case in the "rgw:
coroutine stack protection" thread [4] on the Ceph development mailing

another minor feature that this adds over boost::asio::spawn() is
support for completion handlers with more than one non-error-code
argument. for example, when a handler's signature is (error_code, int,
std::string), the async initiating function will return those
non-error-code values as a std::tuple<int, std::string>


Boost list run by bdawes at, gregod at, cpdaniel at, john at