(WIP) Use AsioFuture to wait asynchronously on blocking tasks#10626
Draft
jschmidt-icinga wants to merge 2 commits intomasterfrom
Draft
(WIP) Use AsioFuture to wait asynchronously on blocking tasks#10626jschmidt-icinga wants to merge 2 commits intomasterfrom
jschmidt-icinga wants to merge 2 commits intomasterfrom
Conversation
6ec7bae to
86ff3fc
Compare
86ff3fc to
5879e6f
Compare
Al2Klimov
reviewed
Nov 7, 2025
| else if (request.method() == http::verb::delete_) | ||
| HandleDelete(request, response); | ||
| else | ||
| return false; |
Member
There was a problem hiding this comment.
What about wrapping at the Handle*() level? I mean, what a waste to deploy a callback which will almost immediately return false..
Contributor
Author
There was a problem hiding this comment.
Absolutely. That's why I put an extra (WIP) in front of the second commit. It was just thrown together quickly to test if it even works. I'm sure it can be made a lot nicer by applying the callbacks more selectively.
Contributor
Author
I fully agree with you here. I won't argue for shipping boost packages on targets where we don't already need them anyway. The PR description is just to track which versions would be needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This could be an alternative approach to get rid of the CpuBoundWork.
WIP for now, but discussions are welcome.
Blockers
The deduction of an async operation's return type was only added in boost-1.80This is actually only necessary for elegance, to support arbitrary completion handlers like ASIO does. Instead we could just (for now) add overloads for the completion handlers we need (i.e. callbacks and yield_context) and ignore others. As long as we're on these old boost versions nobody is going to implement any other completion handlers anyway.std::exception_ptreven in the current version. I will report this to boost.asio, but on its own this wouldn't be too difficult to work around. (However, this only affects the functionality in point 2, so the poor-man's version described in the last bullet point would be unaffected)