ThreadPoolExecutor:
ThreadPoolExecutor (. getPoolSize()) , corePoolSize (. getCorePoolSize()) maximumPoolSize (. getMaximumPoolSize()). execute (java.lang.Runnable), , corePoolSize, , . , corePoolSize, , maximumPoolSize , , . corePoolSize maximumPoolSize , . maxPoolSize , Integer.MAX_VALUE, . , , setCorePoolSize (int) setMaximumPoolSize ().
, : "core" "max". , , "", . , "" , , . , "max". , , .
In general, there is no “right” way for thread pools to work. Any specific implementation can be used: a pool of threads of a fixed size, which always has threads X, or a pool of threads, which always grows to the maximum limit, etc.
Kylem source
share