- How to Create
ExecutorService
ExecutorService es = new ForkJoinPool(2, new ForkJoinPool.ForkJoinWorkerThreadFactory() {
@Override
public ForkJoinWorkerThread newThread(ForkJoinPool pool) {
ForkJoinWorkerThread thread = new ForkJoinWorkerThread(pool);
return thread;
}
}, new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(Thread t, Throwable e) {
}
}, true);
- How to customize akka dispatcher
ActorSystem("sys",Some(config),None,Some(ExecutionContext.fromExecutorService(exectorService)));