Skip to content
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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

update async-simple #882

wants to merge 6 commits into from

Conversation

poor-circle
Copy link
Collaborator

@poor-circle poor-circle commented Jan 16, 2025

What is changing

  1. update async-simple for future support of structure cancellation.

  2. 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

Copy link

for detail, goto summary download Artifacts base-ylt-cov-report(base commit coverage report) and ylt-cov-report(current pull request coverage report)

Copy link

for detail, goto summary download Artifacts base-ylt-cov-report(base commit coverage report) and ylt-cov-report(current pull request coverage report)

Copy link

for detail, goto summary download Artifacts base-ylt-cov-report(base commit coverage report) and ylt-cov-report(current pull request coverage report)

Copy link

for detail, goto summary download Artifacts base-ylt-cov-report(base commit coverage report) and ylt-cov-report(current pull request coverage report)

@@ -71,9 +71,12 @@ class client_pool : public std::enable_shared_from_this<
co_return;
}
while (true) {
auto self_ptr=self.get();
Copy link
Collaborator

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{"
Copy link
Collaborator

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]) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link

for detail, goto summary download Artifacts base-ylt-cov-report(base commit coverage report) and ylt-cov-report(current pull request coverage report)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants