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

Use Reactor's new Schedulers.boundedElastic() #23661

Closed
bclozel opened this issue Sep 18, 2019 · 0 comments
Closed

Use Reactor's new Schedulers.boundedElastic() #23661

bclozel opened this issue Sep 18, 2019 · 0 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@bclozel
Copy link
Member

bclozel commented Sep 18, 2019

As of reactor/reactor-core#1804, Reactor core will provide a new Scheduler implementation, Schedulers.boundedElastic().

This implementation, unlike elastic does not create an unbounded number of threads; it creates a bounded number of workers and will queue tasks if there are no worker available. This implementation is a direct replacement for the elastic one, as it limits the amount of resources.

Spring Framework is currently using alternate Schedulers in several places:

  • a Schedulers.elastic() in StandardWebSocketClient, because the connection phase is blocking. We should improve there and use boundedElastic() instead. While this might not provide big runtime improvements, it's compatible with the existing choice and it should be beneficial to use this scheduler since it should be used in most places
  • the ReactorNettyTcpClient is using a specific parallel scheduler; this use case seems valid and we should not change this
@bclozel bclozel added the type: enhancement A general enhancement label Sep 18, 2019
@bclozel bclozel added this to the 5.2 GA milestone Sep 18, 2019
@bclozel bclozel self-assigned this Sep 18, 2019
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