Returns the thread keep-alive time, which is the amount of time that threads may remain idle before being terminated. Threads that wait this amount of time without processing a task will be terminated if there are more than the core number of threads currently in the pool, or if this pool allows core thread timeout.
unit | the desired time unit of the result |
setKeepAliveTime(long, TimeUnit)
Diagram: ExecutorService