From 998fde0b4c1e6f6beef9999772bd5d24125f207b Mon Sep 17 00:00:00 2001 From: Gustavo Martin Morcuende Date: Thu, 8 Dec 2016 01:36:38 +0100 Subject: [PATCH] NOTICE about parallelism and ForkJoinPool --- .../ForkJoin/src/de/test/fork/join/ForkJoinTaskExample.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Allgemeines/Threads/ForkJoin/src/de/test/fork/join/ForkJoinTaskExample.java b/Allgemeines/Threads/ForkJoin/src/de/test/fork/join/ForkJoinTaskExample.java index 9932c42..6416fe7 100644 --- a/Allgemeines/Threads/ForkJoin/src/de/test/fork/join/ForkJoinTaskExample.java +++ b/Allgemeines/Threads/ForkJoin/src/de/test/fork/join/ForkJoinTaskExample.java @@ -36,6 +36,13 @@ public class ForkJoinTaskExample { // java.util.concurrent.ForkJoinPool.common.threadFactory - the class name of a ForkJoinPool.ForkJoinWorkerThreadFactory // java.util.concurrent.ForkJoinPool.common.exceptionHandler - the class name of a Thread.UncaughtExceptionHandler + + // ForkJoinPool.makeCommonPool() tiene la lógica para calcular el parallelism. El parallelism indica el número de hilos + // en el pool del ForkJoinPool común (compartido en una misma JVM) + // Viene dado o por la propiedad del sistema java.util.concurrent.ForkJoinPool.common.parallelism + // o por el número de CPUs que tenemos Runtime.getRuntime().availableProcessors() + + // By default there is no value for java.util.concurrent.ForkJoinPool.common.exceptionHandler // SO BY DEFAULT, UNCAUGHT EXCEPTIONS ARE LOST FOREVER!!!! :/ final ForkJoinPool pool = new ForkJoinPool(); -- 2.1.4