Search in sources :

Example 1 with ExtendedForkJoinWorkerThread

use of co.paralleluniverse.concurrent.forkjoin.ExtendedForkJoinWorkerThread in project quasar by puniverse.

the class FiberForkJoinScheduler method createForkJoinPool.

private ForkJoinPool createForkJoinPool(String name, int parallelism, UncaughtExceptionHandler exceptionHandler, MonitorType monitorType) {
    final MonitoredForkJoinPool pool = new MonitoredForkJoinPool(name, parallelism, new ExtendedForkJoinWorkerFactory(name) {

        @Override
        protected ExtendedForkJoinWorkerThread createThread(ForkJoinPool pool) {
            return new FiberWorkerThread(pool);
        }
    }, exceptionHandler, true);
    pool.setMonitor(createForkJoinPoolMonitor(name, pool, monitorType));
    return pool;
}
Also used : ExtendedForkJoinWorkerFactory(co.paralleluniverse.concurrent.forkjoin.ExtendedForkJoinWorkerFactory) MonitoredForkJoinPool(co.paralleluniverse.concurrent.forkjoin.MonitoredForkJoinPool) ExtendedForkJoinWorkerThread(co.paralleluniverse.concurrent.forkjoin.ExtendedForkJoinWorkerThread) MonitoredForkJoinPool(co.paralleluniverse.concurrent.forkjoin.MonitoredForkJoinPool) ForkJoinPool(java.util.concurrent.ForkJoinPool)

Aggregations

ExtendedForkJoinWorkerFactory (co.paralleluniverse.concurrent.forkjoin.ExtendedForkJoinWorkerFactory)1 ExtendedForkJoinWorkerThread (co.paralleluniverse.concurrent.forkjoin.ExtendedForkJoinWorkerThread)1 MonitoredForkJoinPool (co.paralleluniverse.concurrent.forkjoin.MonitoredForkJoinPool)1 ForkJoinPool (java.util.concurrent.ForkJoinPool)1