Creates a ForkJoinPool
with the given parameters (using
defaults for others -- see ForkJoinPool(int,
ForkJoinWorkerThreadFactory, UncaughtExceptionHandler, boolean,
int, int, int, Predicate, long, TimeUnit)
).
parallelism | the parallelism level. For default value,
use java.lang.Runtime.availableProcessors . | |
factory | the factory for creating new threads. For default value,
use defaultForkJoinWorkerThreadFactory . | |
handler | the handler for internal worker threads that
terminate due to unrecoverable errors encountered while executing
tasks. For default value, use null . | |
asyncMode | if true,
establishes local first-in-first-out scheduling mode for forked
tasks that are never joined. This mode may be more appropriate
than default locally stack-based mode in applications in which
worker threads only process event-style asynchronous tasks.
For default value, use false . |
IllegalArgumentException | if parallelism less than or equal to zero, or greater than implementation limit | |
NullPointerException | if the factory is null | |
SecurityException | if a security manager exists and
the caller is not permitted to modify threads
because it does not hold java.lang.RuntimePermission ("modifyThread") |
Diagram: ExecutorService