- This article gives an introduction to thread models in soul and usage in various scenarios.
io and work thread
spring-webfluxis one of dependencies of soul, and it uses Netty thread model in lower layer.
Use scheduling thread to execute by default.
A fixed thread pool manages business threads, the number of threads is count in this formula: cpu * 2 + 1.
-Dsoul.scheduler.type=fixedis a default config. If set to other value, a flexible thread pool will take place it.
-Dsoul.work.threads = xxis for configuring number of threads, the default value calculates in following formula
cpu * 2 + 1with a minimum of 16 threads.