/** @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); }
public static int processLimit() { String threads = ErjangConfig.getString("erjang.beam.option.P"); if (threads != null) return Integer.parseInt(threads); else return 500000; }
public static int asyncThreadPoolSize() { String threads = ErjangConfig.getString("erjang.beam.option.A"); if (threads != null) return Integer.parseInt(threads); else return 10; }