Example #1
0
  /** @return */
  public static int threadPoolSize() {
    String threads = ErjangConfig.getString("erjang.beam.option.S");
    if (threads != null) {
      try {
        return Math.max(2, Integer.parseInt(threads));
      } catch (NumberFormatException e) {
        // ignore //
      }
    }

    return Math.max(2, Runtime.getRuntime().availableProcessors() / 2);
  }
Example #2
0
 public static int processLimit() {
   String threads = ErjangConfig.getString("erjang.beam.option.P");
   if (threads != null) return Integer.parseInt(threads);
   else return 500000;
 }
Example #3
0
 public static int asyncThreadPoolSize() {
   String threads = ErjangConfig.getString("erjang.beam.option.A");
   if (threads != null) return Integer.parseInt(threads);
   else return 10;
 }