[concurrency-interest] Whats up with the ThreadPoolExecutor?

Ravinder Singh ravs at online.no
Tue Aug 23 03:21:57 EDT 2005


The reason I am doing it this way, is that our system processess 
messages from a jms queue. And I am using a threadpool to faster process 
messages simoultaneously. But if I somehow loose connection to the 
message source, I must drop everything in the work queue.
By using the same Runnable which just picks messages from a linkedlist I 
could just empty that list, when connection breaks.

I have allready reported the bug to Sun, and hopefully they will do 
something about it.


Doug Lea wrote:

> David Holmes wrote:
>
>>
>> There is an easy fix that Dawid can hopefully get into the backport 
>> in the
>> very near future:
>
>
> And the fix for the java.util.concurrent version will with some luck 
> be in Mustang.
>
> While we never expected anyone to reuse Runnable tasks
> in this way, (and in general, it is not a good idea)
> the specs did not say you cannot, so it is indeed a bug.
>
> -Doug
>
>
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest
>
>
>



More information about the Concurrency-interest mailing list