[concurrency-interest] ThreadPoolExecutor workQueue concurrency issue

Joseph Seigh jseigh_cp00 at xemaps.com
Tue Dec 11 06:11:45 EST 2007

Guy Korland wrote:
> Hi,
> We built an application in a SEDA fashion, working in stages from one 
> ThreadPool to another.
> We found out that the BlockingQueue used by the ThreadPoolExecutor 
> became a major concurrency killer when we start working on 4 cores 
> machines and above.
> The thing is that we don't really need the strong FIFO behavior forced 
> by all the BlockingQueue implementations available, some kind of 
> fairness will be good enough.
> Any ideas?

I made a blocking queue out of a fast semaphore and 
ConcurrentLinkedQueue which did pretty
good on a single core anyway.   Code for fast semaphore is here.

You could implement a BlockingQueue and try plugging that in.

Joe Seigh

More information about the Concurrency-interest mailing list