Skip to content

v1.4.0

Compare
Choose a tag to compare
@Jacksgong Jacksgong released this 09 Oct 06:25
· 28 commits to master since this release

中文

New Interfaces

  • Add ThreadPools#newNoCorePool: If there are threadCount tasks are running, the further task will be enqueued to the waiting queue, and will be executed when the size of running tasks less than threadCount. If the thread in this pool is turn to idle and the interval time of waiting for new tasks more keepAliveTime, it will be terminate to reduce the cost of resources.

Enhancement

  • Improve Stability: If corePoolSize is equal to0 when ThreadPools.newExceedWaitPool is called, then we will createNoCorePool instead of ExceedWaitPool to avoid the small probability of StackOverflow because getActiveCount() may return 0 when corePoolSize is 0 in ExceedWaitPool and performs a large number of tasks at high frequencies, but the actual running thread The number is greater than 0. Ref #1.