In case newCachedThreadPool()
as per creates a thread pool that creates new threads as needed, but will reuse previously constructed threads when they are available whereas in case of newFixedThreadPool(int size)
specify size to create the thread pool with size specified.
Why isn'tnewFixedThreadPool(int size)
implemented in newCachedThreadPool()
fashion where thread pool creates the new thread only when required and will limit the thread to size?
Any clarrification on the above is really helpful.