My question is very similar to this one : @Async prevent a thread to continue until other thread have finished
Basically i need run ~ hundreds of computations in mor
Since spring boot 2.1 you can use auto configuration and change the maximum number of threads in the application properties file
spring.task.execution.pool.max-size=4
See the full documentation:
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-task-execution-scheduling