-
Notifications
You must be signed in to change notification settings - Fork 37
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
Uses asio::deferred_t as default completion type. #228
base: develop
Are you sure you want to change the base?
Uses asio::deferred_t as default completion type. #228
Conversation
Hi @anarthal, does this fix the issue? Thanks. |
From what I read from my cell phone I'd say it does. I'm planning on reviewing it from my PC on Monday. |
I've left a couple of suggestions. They're not at all needed for this to work, you can do them if/whenever you want. Also, I'd also write a couple of tests to cover that all the functions you changed successfully support the default token. That might be even a piece of code that you don't run, just to check it builds. As I said, they're suggestions, the changes look good as they are. |
template <class CompletionToken> | ||
auto async_run(config const& cfg, logger l, CompletionToken token) | ||
template <class CompletionToken = asio::deferred_t> | ||
auto async_run(config const& cfg, logger l, CompletionToken token = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As minor comments, consider unifying all signatures using completion tokens to CompletionToken&&
@@ -1281,15 +1274,19 @@ class connection { | |||
} | |||
|
|||
/// Calls `boost::redis::basic_connection::async_exec`. | |||
template <class Response, class CompletionToken> | |||
auto async_exec(request const& req, Response& resp, CompletionToken&& token) | |||
template <class Response, class CompletionToken = asio::deferred_t> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also consider using BOOST_ASIO_COMPLETION_TOKEN_FOR
to implement concept checks.
No description provided.