[concurrency-interest] Whats up with the ThreadPoolExecutor?

Dawid Kurzyniec dawidk at mathcs.emory.edu
Mon Aug 22 20:47:41 EDT 2005


David Holmes wrote:

>Ravinder,
>
>  
>
>>I don't know if this is a bug or me just using it wrongly. But I add
>>work to the pool, and I add the same Runnable each time. Since I try to
>>avoid GC. But it seems that it doesn't process the full queue. If I
>>create a new Runnable each time its ok.
>>    
>>
>
>As Tim indicated this is indeed a bug, but one only exercised under
>particular conditions:
> - there are >= core-size threads already in the pool
> - the queue is bounded and full
> - you've submitted the same Runnable multiple times
>
>So change any of the above and you can work-around the problem.
>
>There is an easy fix that Dawid can hopefully get into the backport in the
>very near future:
>
>  
>
I will. Thanks.

BTW. the updated backport distribution, with fix of Condition variables 
which used to not properly release multiple lock holds on await() can be 
downloaded from the backport page - under "daily builds".

Regards,
Dawid




More information about the Concurrency-interest mailing list