As per spring documentation for setWaitForTasksToCompleteOnShutdown Set whether to wait for scheduled tasks to complete on shutdown Does it mean that if any task is stuck on some long running process and we explicity try to stop the container, it will not be terminated untill that task is finished? Thanks for the answers. Answer Short answer? Yes On shutdown (
Tag: threadpool
Connection Pool and thread pool setting in Java
Spring application using Hikari pool. Now for a single request from the client I have to query 10 tables(business required), and then composite the result together. And querying for each table may cost 50ms to 200ms. To speed up the response time, I create a FixedThreadPool in my service to query each table in different thread(pseudocode): Now for a single