This was raised and discussed under #21184, but closed with https://github.com/spring-projects/spring-framework/issues/21184#issuecomment-506685961 potentially to revisit for Loom.
We can enhance WebFuxConfigurer
with options for blocking execution, e.g. to configure an AsyncTaskExecutor
such as the new VirtualThreadTaskExecutor. The executor would be used to invoke synchronous controller methods, but we can also expose a Predicate
for more fine-grained control over that decision.
An AsyncTaskExecutor
if configured can also be used in places where we currently default Schedulers#boundedElastic
such as DefaultPartHttpMessageReader
and InMemoryWebSession
to absorb blocking.
WebMvcConfigurer
has analogous options, but in support of Servlet 3.1 asynchronous requests.