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

Offload the work to a calling thread when using blocking streaming instead of creating a new thread #515

Merged
merged 1 commit into from
Sep 26, 2020

Conversation

pivovarit
Copy link
Owner

@pivovarit pivovarit commented Sep 26, 2020

Whenever using one of the factories returning Stream<T>, the internal dispatcher creates an extra internal thread to orchestrate the processing.

However, this is not necessary since the calling thread could perform the same job. For now, it just blocks and waits for the results.

@pivovarit pivovarit force-pushed the save-threads-when-streaming branch from 2af520b to d84d695 Compare September 26, 2020 16:21
@pivovarit pivovarit force-pushed the save-threads-when-streaming branch from d84d695 to c16e64c Compare September 26, 2020 16:47
@pivovarit pivovarit merged commit 1835c37 into master Sep 26, 2020
@pivovarit pivovarit deleted the save-threads-when-streaming branch September 26, 2020 16:59
@pivovarit pivovarit added the enhancement New feature or request label Sep 26, 2020
@pivovarit pivovarit changed the title Use a calling thread when using blocking streaming instead of creating a new one Offload the work to a calling thread when using blocking streaming instead of creating a new thread Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant