Class ForkJoinExecutorService

java.lang.Object
java.util.concurrent.AbstractExecutorService
net.imglib2.parallel.ForkJoinExecutorService
All Implemented Interfaces:
AutoCloseable, Executor, ExecutorService

public class ForkJoinExecutorService extends AbstractExecutorService
The ForkJoinExecutorService is an ExecutorService, for efficient nested parallelization.

The ForkJoinPool is an ExecutorService that provides an entry point to a technique called work-steeling. Work-steeling allows good performance for nested parallelization. But calling ForkJoinPool.submit(ForkJoinTask) or ForkJoinPool.invokeAll(Collection, long) alone, won't result in any work-steeling and performance boost. It's necessary to use ForkJoinTasks and their methods fork or invokeAll to benefit from work-steeling.

ForkJoinExecutorService is an ExecutorService that internally calls ForkJoinTask.fork() and ForkJoinTask.invokeAll(...) and therefore directly achieves good performance by work-steeling.

ForkJoinExecutorService is not a fully functional ExecutorService. Methods like shutdownNow(), awaitTermination(long, TimeUnit) and invokeAll(Collection, long, TimeUnit) are not implemented.