Using separate thread pools is good, the default practice and sharing of threads is (possibly premature) optimization.
Through Java 7, the answer is no, there is no default thread, and the recommendation is to have many threads. This is a good separation and will prevent blocking the behavior of one set of tasks from interfering with another.
If you share file paths, you should ask questions such as:
- Can a logging system distinguish between tasks? (Threads are one way to distinguish.)
- If task pool A accidentally requests too many threads and shuts down, should pool B start? When you notice that task pool B is not working, can you diagnose the problem in task pool A?
- Should block A pools have to starve B?
, LightweightThreadpool. 5 , , . 6- ... , , , , , . 5 , , , , , , , , .
, , , . , . , , .
Java 8, "" ( Tagir ). , , .