[concurrency-interest] ThreadPoolExecutor workQueue concurrency issue
jseigh_cp00 at xemaps.com
Tue Dec 11 06:11:45 EST 2007
Guy Korland wrote:
> 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.
More information about the Concurrency-interest