[concurrency-interest] Work-stealing ThreadPool

Aleksey Shipilev aleksey.shipilev at gmail.com
Fri Apr 20 07:44:03 EDT 2012


Hi Doug,

On 04/20/2012 03:15 PM, Doug Lea wrote:
> Is this what you are looking for?

Not quite. If I control the application source code, I can do proper
isolation. However, from the purist JDK point of view, we (JDK
maintainers) are better provide clean API to make users tell us the only
thing they want from executor is not FJP itself, but just work-stealing
executor.

> If not, maybe the simplest addition is to add a factory method
> in class Executors:
>   ExecutorService workStealingExecutor() {
>     return new ForkJoinPool();
>   }

Yes, that works. IMO, there's also should be additional method which
controls parallelism. Also, should we force async mode here?

-Aleksey.


More information about the Concurrency-interest mailing list