Java Reference
In-Depth Information
Listing 12.8. Thread Factory for Testing ThreadPoolExecutor .
If the core pool size is smaller than the maximum size, the thread pool should grow as de-
mand for execution increases. Submitting long-running tasks to the pool makes the number
of executing tasks stay constant for long enough to make a few assertions, such as testing that
the pool is expanded as expected, as shown in Listing 12.9 .
Search WWH ::




Custom Search