this.timer = timeService != null ? timeService : createTimer(fjPool, getMonitor());
}
private ForkJoinPool createForkJoinPool(String name, int parallelism, Thread.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;
}