-
Notifications
You must be signed in to change notification settings - Fork 252
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
update async-simple #882
base: main
Are you sure you want to change the base?
update async-simple #882
Conversation
for detail, goto summary download Artifacts |
for detail, goto summary download Artifacts |
for detail, goto summary download Artifacts |
for detail, goto summary download Artifacts |
@@ -71,9 +71,12 @@ class client_pool : public std::enable_shared_from_this< | |||
co_return; | |||
} | |||
while (true) { | |||
auto self_ptr=self.get(); |
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.
remove
@@ -86,6 +89,9 @@ class client_pool : public std::enable_shared_from_this< | |||
<< self->host_name_ | |||
<< "}, now client cnt: " << clients.size(); | |||
if (is_all_cleared != 0) [[unlikely]] { | |||
ELOG_TRACE << "start Yield of pool{" |
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.
remove
for (int i = 0; i < 100; ++i) { | ||
auto res = co_await load_blancer.send_request( | ||
[&i, &hosts]( | ||
coro_rpc::coro_rpc_client &client, | ||
std::string_view host) -> async_simple::coro::Lazy<void> { | ||
co_await client.call<hello>(); | ||
if (i > 0) | ||
if (i > 0 && host != hosts[1]) { |
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.
remove
for detail, goto summary download Artifacts |
What is changing
update async-simple for future support of structure cancellation.
New version async-simple could provide a hint of schedule priority, now when we call async_simple::coro::Yield{}, we will push the work to the queue instead run it immediately, which avoid of stack overflow.
Example