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

FluxPublishOn to detach itself after further requests #3954

Open
MikkelHJuul opened this issue Dec 19, 2024 · 0 comments
Open

FluxPublishOn to detach itself after further requests #3954

MikkelHJuul opened this issue Dec 19, 2024 · 0 comments
Labels
type/enhancement A general enhancement

Comments

@MikkelHJuul
Copy link

The FluxPublishOnSubscriber#runAsync will never escape its infinite loop if the call to onNext take longer time than the period between events from upstream.

This makes it so that the thread will never stop looping. And it has the unfortunate effect that; for a Scheduler of pool size N. If M (greater than N) upstream fluxes #publishOn that scheduler, only N of those fluxes will be subscribed and worked on.

While upstream supply is available I would prefer even distribution across all fluxes.

I suggest adding a flag to the publishOn that would allow control that the loop escape after requesting, or performing the request in the scheduler itself. This would free up the thread to pick up other tasks from the taskqueue.

@MikkelHJuul MikkelHJuul added the type/enhancement A general enhancement label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant