On Sun, Nov 28, 2021 at 1:50 AM Oliver Kowalke via Boost
Hi, 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.
Oliver
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
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
https://github.com/ceph/spawn/, 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
list
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