That everything is so clearly explained is correct. A few things to keep in mind are that you should always have a limited size for both the main pool and the queue. If the size of the base pool is very large, it is likely that many of your threads from the pool will not be used for a certain period of time, because for each request a new thread is created until it reaches the maximum pool size
But if your machine will simultaneously process a large number of requests, you should also consider that its size is sufficient enough: example:
If your computer is 1 GB in size and the queue capacity is Integer.MAX_VALUE, then there is a high probability that your machine will at some point in time reject the request due to OutOfMemory, which you can track in any JVM GUI tool.
SinhaOjas Aug 15 '19 at 19:16 2019-08-15 19:16
source share