Example #1
0
 public void setNbThread(String s) {
   if (s != null && s.matches("\\d+")) {
     option.setNbThreads(Integer.parseInt(s));
     final int nbThreads = option.getNbThreads();
     this.executorService = Executors.newFixedThreadPool(nbThreads);
   }
   if ("auto".equalsIgnoreCase(s)) {
     option.setNbThreads(Option.defaultNbThreads());
     final int nbThreads = option.getNbThreads();
     this.executorService = Executors.newFixedThreadPool(nbThreads);
   }
 }