GrowingThreadPool.java | Class | This needs testing.
A growable thread pool.
It's like the generic thread pool, but :
Starts at 10% of initial threads provided (or whatever you set with growthRatio)
When the pool is exhausted and a new thread is required, it will start
numThreads*growRatio new threads, and place them in the pool, if the pool
has still lower than numThreads
Each 5000 ms, (or whatever you set), a "control thread" will look for
unused threads and decrease the size of the pool as needed. |