Skip to content

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

Description

@hongxinGuo

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions