[concurrency-interest] What's the advantage of a Java-5 ThreadPoolExecutor over a Java-7 ForkJoinPool?

Holger Peine Holger.Peine at fh-hannover.de
Wed Feb 15 05:04:53 EST 2012

Am 15.02.2012 09:38, schrieb √iktor Ҡlang:
> You guys should have a look at the latest post at letitcrash.com
> <http://letitcrash.com>

This blog post shows an example that ForkJoinPool (in particular,
the latest implementation of it, which is not yet in the JDK) is
faster then ThreadPoolExecutor when you have many small tasks,
because the single queue in ThreadPoolExecutor is heavily contended
then, in contrast to the many queues in ForkJoinPool.

This is not surprising and in fact perfectly matches what I had
summarized as criteria for choosing between ForkJoinPool and
ThreadPoolExecutor. My question, on the other hand, was this:
"What advantages of ThreadPoolExecutor are left?". The blog post
rather seems to support my provocative suggestion (which I still
feel is not correct) that ForkJoinPool is a kind of "better


Prof. Dr. Holger Peine
Hochschule Hannover, Fakultät IV, Abt. Informatik
Tel: +49(511)9296-1830  Fax: -1810 (shared, please state my name)
Ricklinger Stadtweg 120, D-30459 Hannover, Germany

More information about the Concurrency-interest mailing list