Skip to content

Tag: threadpool

Can Java handle 10 Thread pool at the same time

I have a Java Application which handles different region for example 10 regions. Each region have different number of tasks. I encounter a problem is that one particular region (Region A) have lots of tasks and the processing time of each task for that region is very long. Therefore, if I use a Single Thread …

Spring Boot async task stuck on shutdown

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…

Java Scheduler Thread Switching

I’ve read somewhere that in Java scheduler, thread switching happens after execution of certain amount of instructions and not after a certain time (like schedulers used in operating systems). But the references were missing. I wanted to know if this is correct. Answer Java used to have a feature called…