You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.