問題簡述:spring
配置的隊列初始化的消費者線程佔滿了線程池。致使其餘的再使用此線程池中線程不運行。不報錯,不拋異常。線程的數量僅爲爲線程池的配置中的最小值。less
<task:executor pool-size="100-150" queue-capacity="250" >ide
同時schema描述中寫道:this
The size of the executor's thread pool as either a single value or a range
(e.g. 5-10). If no bounded queue-capacity value is provided, then a max value
has no effect unless the range is specified as 0-n. In that case, the core pool
will have a size of n, but the 'allowCoreThreadTimeout' flag will be set to true.
If a queue-capacity is provided, then the lower bound of a range will map to the
core size and the upper bound will map to the max size. If this attribute is not
provided, the default core size will be 1, and the default max size will be
Integer.MAX_VALUE (i.e. unbounded).
。。。。。spa
後來解決辦法:趕忙調大了線程池的數量。
線程
spring 版本:3.2.8隊列