-
Notifications
You must be signed in to change notification settings - Fork 185
Adapt boost::asio to stdexec #1501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- You can now use async-networking in stdexec. - Making boost::asio return senders. - Only 1 tiny header file. Thank you.
I've long wanted something like this, thank you! I am no ASIO expert, but I know a few. I have asked one to weigh in on this PR. |
/ok to test |
I like the concept of adapting Asio initiating functions to yield senders, and have implemented something similar in my company's code base. In addition to the fact this PR doesn't have any unit tests, I also see missing functionality which is crucial to correctly adapt Asio initiating functions to senders. As far as I can tell the proposed The next issue directly follows from the above. In addition to throwing exceptions (leading to the final completion handler never being invoked) the Asio model supports what I call "abandonment." You can simply walk away from a running operation, allow the lifetime of the completion handlers to end, and everything is fine. Lastly on the list of crucial issues is the fact that while Asio supports cancellation via cancellation slots and signals As a possible quality of life improvement |
Also: This PR doesn't seem to account for the fact that Asio asynchronous operations can have multiple completion signatures. |
@RobertLeahy Thank you for your excellent feedback and insights -- I really appreciate it :) Point 0: Missing unit tests
Point 3: Cancellation
Point 4: Error_code
Points 1 & 2: Multiple/Unexecuted boost::asio::completion_tokens
|
…ec' into adapt-asio-to-stdexec
i don't know enough about ASIO to weigh the pros and cons of this PR and #1503. are there advantages to this PR in your opinion? we can use your tests and examples regardless. |
I don't know enough about Feel free to use above tests and examples. I hope they'll help people better understand stdexec. (Sorry for the late reply - my GitHub account was temporarily suspended due to an automated system error, and I only just saw this comment now.) |
Stdexec is advanced and modern, but we haven't yet built a complete networking/IO wheel on top of it. If we integrate boost::asio seamlessly with stdexec, we’ll not only get to experimentally try out networking in stdexec right now, but also help validate some of stdexec’s concepts as a proof.
Changes:
Wishes:
Thank you :)