The answer depends on whether you need to segregate application resources between different types of activity or not.
For example, I am currently writing a server application consisting of a few high-throughput writers and potentially many readers. Readers will access the app sporadically but could potentially request a lot of data (i.e. long running requests). I need to ensure that writers are never starved so am going to use two thread pools in my design for reading / writing. If the reader thread pool is temporarily exhausted the writers will be unaffected; only read requests will be delayed.
An alternative would have been to use a PriorityQueue
in conjunction with a ThreadPoolExecutor
and assign a higher priority to write requests.
So in conclusion - My advice would be: Start off with one thread pool and only make your design more complex if there's a concrete reason for doing so.