|
Boost : |
From: Christopher Kohlhoff (chris_at_[hidden])
Date: 2021-12-01 13:22:06
On Sun, Nov 28, 2021, at 5:49 PM, Oliver Kowalke via Boost wrote:
> 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.
In a nutshell: I am not going to remove spawn() from Asio, nor am I going to keep it in its current form forever. This boost.spawn library might well have utility for some folks right now, but it doesn't reflect the design direction that I have in mind for asio::spawn().
Specifically, the current problem is the code breakage inherent in upgrading asio::spawn() from coroutine-v1 to anything else. This breakage relates to:
- C++03 support
- coroutine-v1 structures that are exposed through the API
I have opted to defer that breakage for as long as possible, until I decide on the form, function, language requirement, and level of backward compatibility of a post-breakage asio::spawn() API.
The proposal in this thread is to work around me by providing a library as an alternative to asio::spawn(), because I have not yet upgraded asio::spawn(). As part of providing this alternative library, the proposal is that I should also remove asio::spawn()... and in doing so break user code.
If there is to be breakage in asio::spawn(), then that breakage creates the opportunity for introducing improvements. I do have some ideas of what these will be... performance, usability, consistency and integration with more recent additions to Asio. Of course this entails spending some time on design work and implementation, but I intend to do this and it will be happening at some point relatively soon. A one-to-one substitution of boost.context in place of boost.coroutine-v1 won't achieve this.
Chris
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk