this.nThreads = nThreads;
if ( nThreads == 1 ) {
this.mapExecutor = this.masterExecutor = null;
} else {
this.masterExecutor = Executors.newSingleThreadExecutor(new NamedThreadFactory("NS-master-thread-%d"));
this.mapExecutor = Executors.newFixedThreadPool(nThreads, new NamedThreadFactory("NS-map-thread-%d"));
}
}