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

example 2_concurrent_even_number_counting don't functionally in working thread #159

Open
hongxinGuo opened this issue Feb 23, 2024 · 0 comments

Comments

@hongxinGuo
Copy link

hongxinGuo commented Feb 23, 2024

Hi,
I run this example in a working thread. the function count_even returned without waiting "co_await result". How cound I changed the code to fix it?

for (auto& result : chunk_count) {
	total_count += co_await result;
}
co_return total_count;

I have found the problem. The working thread caller should't be created by thread_pool_executor or background_executor, thread_executor is OK. But why?

@hongxinGuo hongxinGuo changed the title example 2_concurrent_even_number_counting don't functionally in VS2022 example 2_concurrent_even_number_counting don't functionally in working thread Feb 28, 2024
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

No branches or pull requests

1 participant