Android examples for java.lang:Thread
get Default Thread Pool Size
public class Main { public static int getDefaultThreadPoolSize(int max) { int availableProcessors = 2 * Runtime.getRuntime().availableProcessors() + 1; return availableProcessors > max ? max : availableProcessors; }//from ww w. j a va2 s . c om }