What is the difference between Schedulers.newElastic and Schedulers.elastic methods? What is the difference between Schedulers.newElastic and Schedulers.elastic methods? multithreading multithreading

What is the difference between Schedulers.newElastic and Schedulers.elastic methods?


The elastic() function returns a shared scheduler instance. This means that multiple calls to this function will return the same scheduler.

The functions prefixed with new will always create a new scheduler instance.

Check the docs for the Schedulers class here: https://projectreactor.io/docs/core/release/api/